summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/IslCodeGeneration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/CodeGen/IslCodeGeneration.cpp')
-rw-r--r--polly/lib/CodeGen/IslCodeGeneration.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp
index 0d9a798de04..22a8fe51abf 100644
--- a/polly/lib/CodeGen/IslCodeGeneration.cpp
+++ b/polly/lib/CodeGen/IslCodeGeneration.cpp
@@ -591,7 +591,9 @@ public:
Value *buildRTC(PollyIRBuilder &Builder, IslExprBuilder &ExprBuilder) {
Builder.SetInsertPoint(Builder.GetInsertBlock()->getTerminator());
Value *RTC = ExprBuilder.create(AI->getRunCondition());
- return Builder.CreateIsNotNull(RTC);
+ if (!RTC->getType()->isIntegerTy(1))
+ RTC = Builder.CreateIsNotNull(RTC);
+ return RTC;
}
bool runOnScop(Scop &S) {
OpenPOWER on IntegriCloud