From 2784b0803a593faa9b42cd660d1fcaddc03d278f Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Sat, 10 Jan 2015 07:40:39 +0000 Subject: [PATCH] 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 --- polly/lib/CodeGen/IslCodeGeneration.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/polly/lib/CodeGen/IslCodeGeneration.cpp b/polly/lib/CodeGen/IslCodeGeneration.cpp index 9fc101d..4087c84 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; -- 2.7.4