summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2018-04-19 05:38:12 +0000
committerTobias Grosser <tobias@grosser.es>2018-04-19 05:38:12 +0000
commitc49f115b2743cd11007a3986c06c6a2c6a93065f (patch)
tree488eec347e45a34982d132d345aaeb7ec09ecbc0 /polly/lib/CodeGen
parentf846e2d1b156c5373d2289e96b0b57e6049c020d (diff)
downloadbcm5719-llvm-c49f115b2743cd11007a3986c06c6a2c6a93065f.tar.gz
bcm5719-llvm-c49f115b2743cd11007a3986c06c6a2c6a93065f.zip
[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
Diffstat (limited to 'polly/lib/CodeGen')
-rw-r--r--polly/lib/CodeGen/RuntimeDebugBuilder.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/polly/lib/CodeGen/RuntimeDebugBuilder.cpp b/polly/lib/CodeGen/RuntimeDebugBuilder.cpp
index e127673a48d..6c54f137ce7 100644
--- a/polly/lib/CodeGen/RuntimeDebugBuilder.cpp
+++ b/polly/lib/CodeGen/RuntimeDebugBuilder.cpp
@@ -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
OpenPOWER on IntegriCloud