forked from OSchip/llvm-project
[RuntimeDebugBuilder] Do not break for 64 bit integers
In r330292 this assert was turned incorrectly into an unreachable, but the correct behavior (thanks Michael) is to assert for anything that is not 64 bit, but falltrough for 64 bit. I document this in the source code. llvm-svn: 330309
This commit is contained in:
parent
f846e2d1b1
commit
c49f115b27
|
@ -188,10 +188,13 @@ void RuntimeDebugBuilder::createGPUPrinterT(PollyIRBuilder &Builder,
|
|||
if (!Ty->isDoubleTy())
|
||||
Val = Builder.CreateFPExt(Val, Builder.getDoubleTy());
|
||||
} else if (Ty->isIntegerTy()) {
|
||||
if (Ty->getIntegerBitWidth() < 64)
|
||||
if (Ty->getIntegerBitWidth() < 64) {
|
||||
Val = Builder.CreateSExt(Val, Builder.getInt64Ty());
|
||||
else
|
||||
llvm_unreachable("Integer types larger 64 bit not supported");
|
||||
} else {
|
||||
assert(Ty->getIntegerBitWidth() == 64 &&
|
||||
"Integer types larger 64 bit not supported");
|
||||
// fallthrough
|
||||
}
|
||||
} else if (auto PtTy = dyn_cast<PointerType>(Ty)) {
|
||||
if (PtTy->getAddressSpace() == 4) {
|
||||
// Pointers in constant address space are printed as strings
|
||||
|
|
Loading…
Reference in New Issue