summaryrefslogtreecommitdiffstats
path: root/polly/lib/CodeGen/IslCodeGeneration.cpp
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2015-01-10 07:40:39 +0000
committerTobias Grosser <tobias@grosser.es>2015-01-10 07:40:39 +0000
commit2784b0803a593faa9b42cd660d1fcaddc03d278f (patch)
tree7c1cf997d7b3b6a965b476a7bfcd68df36e1e268 /polly/lib/CodeGen/IslCodeGeneration.cpp
parent17ddb829aaedac954bcd3fdb457e30759ede99c4 (diff)
downloadbcm5719-llvm-2784b0803a593faa9b42cd660d1fcaddc03d278f.tar.gz
bcm5719-llvm-2784b0803a593faa9b42cd660d1fcaddc03d278f.zip
Check assert before the instruction that uses the assumption checked.
I did not find a good test case, as the assert should generally hold in Polly. llvm-svn: 225582
Diffstat (limited to 'polly/lib/CodeGen/IslCodeGeneration.cpp')
-rw-r--r--polly/lib/CodeGen/IslCodeGeneration.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp
index 9fc101db6e3..4087c84c1ff 100644
--- a/polly/lib/CodeGen/IslCodeGeneration.cpp
+++ b/polly/lib/CodeGen/IslCodeGeneration.cpp
@@ -245,11 +245,12 @@ IslNodeBuilder::getUpperBound(__isl_keep isl_ast_node *For,
Cond = isl_ast_node_for_get_cond(For);
Iterator = isl_ast_node_for_get_iterator(For);
- Type = isl_ast_expr_get_op_type(Cond);
-
+ isl_ast_expr_get_type(Cond);
assert(isl_ast_expr_get_type(Cond) == isl_ast_expr_op &&
"conditional expression is not an atomic upper bound");
+ Type = isl_ast_expr_get_op_type(Cond);
+
switch (Type) {
case isl_ast_op_le:
Predicate = ICmpInst::ICMP_SLE;
OpenPOWER on IntegriCloud