summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'polly/lib/CodeGen')
-rw-r--r--polly/lib/CodeGen/PPCGCodeGeneration.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
index fa37f097f4c..9d851d1b967 100644
--- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp
+++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
@@ -12,6 +12,7 @@
//
//===----------------------------------------------------------------------===//
+#include "polly/CodeGen/IslAst.h"
#include "polly/CodeGen/IslNodeBuilder.h"
#include "polly/CodeGen/Utils.h"
#include "polly/DependenceInfo.h"
@@ -2038,10 +2039,17 @@ public:
executeScopConditionally(*S, this, Builder.getTrue());
// TODO: Handle LICM
- // TODO: Verify run-time checks
auto SplitBlock = StartBlock->getSinglePredecessor();
Builder.SetInsertPoint(SplitBlock->getTerminator());
NodeBuilder.addParameters(S->getContext());
+
+ isl_ast_build *Build = isl_ast_build_alloc(S->getIslCtx());
+ isl_ast_expr *Condition = IslAst::buildRunCondition(S, Build);
+ isl_ast_build_free(Build);
+
+ Value *RTC = NodeBuilder.createRTC(Condition);
+ Builder.GetInsertBlock()->getTerminator()->setOperand(0, RTC);
+
Builder.SetInsertPoint(&*StartBlock->begin());
NodeBuilder.initializeAfterRTH();
OpenPOWER on IntegriCloud