summaryrefslogtreecommitdiff
path: root/gcc/tree-scalar-evolution.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-scalar-evolution.c')
-rw-r--r--gcc/tree-scalar-evolution.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/gcc/tree-scalar-evolution.c b/gcc/tree-scalar-evolution.c
index 576fce0ae11..ffead4903b7 100644
--- a/gcc/tree-scalar-evolution.c
+++ b/gcc/tree-scalar-evolution.c
@@ -1065,8 +1065,8 @@ follow_ssa_edge_in_rhs (struct loop *loop,
- an INTEGER_CST,
- a PLUS_EXPR,
- a MINUS_EXPR,
- - other cases are not yet handled.
- */
+ - an ASSERT_EXPR,
+ - other cases are not yet handled. */
switch (TREE_CODE (rhs))
{
case NOP_EXPR:
@@ -1247,6 +1247,20 @@ follow_ssa_edge_in_rhs (struct loop *loop,
break;
+ case ASSERT_EXPR:
+ {
+ /* This assignment is of the form: "a_1 = ASSERT_EXPR <a_2, ...>"
+ It must be handled as a copy assignment of the form a_1 = a_2. */
+ tree op0 = ASSERT_EXPR_VAR (rhs);
+ if (TREE_CODE (op0) == SSA_NAME)
+ res = follow_ssa_edge (loop, SSA_NAME_DEF_STMT (op0),
+ halting_phi, evolution_of_loop);
+ else
+ res = false;
+ break;
+ }
+
+
default:
res = false;
break;
@@ -1701,6 +1715,11 @@ interpret_rhs_modify_expr (struct loop *loop,
case SSA_NAME:
res = chrec_convert (type, analyze_scalar_evolution (loop, opnd1));
break;
+
+ case ASSERT_EXPR:
+ opnd10 = ASSERT_EXPR_VAR (opnd1);
+ res = chrec_convert (type, analyze_scalar_evolution (loop, opnd10));
+ break;
case NOP_EXPR:
case CONVERT_EXPR: