[polly] r330309 - [RuntimeDebugBuilder] Do not break for 64 bit integers
Tobias Grosser via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 18 22:38:12 PDT 2018
Author: grosser
Date: Wed Apr 18 22:38:12 2018
New Revision: 330309
URL: http://llvm.org/viewvc/llvm-project?rev=330309&view=rev
Log:
[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.
Modified:
polly/trunk/lib/CodeGen/RuntimeDebugBuilder.cpp
Modified: polly/trunk/lib/CodeGen/RuntimeDebugBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/CodeGen/RuntimeDebugBuilder.cpp?rev=330309&r1=330308&r2=330309&view=diff
==============================================================================
--- polly/trunk/lib/CodeGen/RuntimeDebugBuilder.cpp (original)
+++ polly/trunk/lib/CodeGen/RuntimeDebugBuilder.cpp Wed Apr 18 22:38:12 2018
@@ -188,10 +188,13 @@ void RuntimeDebugBuilder::createGPUPrint
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
More information about the llvm-commits
mailing list