diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-03 13:43:23 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-04-03 13:43:23 +0000 |
commit | 5da4c394e52aa3d9d1faa07f246a6a76e22cd3ed (patch) | |
tree | b55ceac5099a5d518e335329794a0dce98c11946 /gcc/graphite-scop-detection.c | |
parent | a35a8e187951b24c38768f48813bb0b82f567b2c (diff) | |
download | gcc-5da4c394e52aa3d9d1faa07f246a6a76e22cd3ed.tar.gz |
2014-04-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/60740
* graphite-scop-detection.c (stmt_simple_for_scop_p): Iterate
over all GIMPLE_COND operands.
* gcc.dg/graphite/pr60740.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209057 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-scop-detection.c')
-rw-r--r-- | gcc/graphite-scop-detection.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/graphite-scop-detection.c b/gcc/graphite-scop-detection.c index 1d7c7485f85..b5e4a8c8cb3 100644 --- a/gcc/graphite-scop-detection.c +++ b/gcc/graphite-scop-detection.c @@ -346,13 +346,10 @@ stmt_simple_for_scop_p (basic_block scop_entry, loop_p outermost_loop, case GIMPLE_COND: { - tree op; - ssa_op_iter op_iter; - enum tree_code code = gimple_cond_code (stmt); - /* We can handle all binary comparisons. Inequalities are also supported as they can be represented with union of polyhedra. */ + enum tree_code code = gimple_cond_code (stmt); if (!(code == LT_EXPR || code == GT_EXPR || code == LE_EXPR @@ -361,11 +358,14 @@ stmt_simple_for_scop_p (basic_block scop_entry, loop_p outermost_loop, || code == NE_EXPR)) return false; - FOR_EACH_SSA_TREE_OPERAND (op, stmt, op_iter, SSA_OP_ALL_USES) - if (!graphite_can_represent_expr (scop_entry, loop, op) - /* We can not handle REAL_TYPE. Failed for pr39260. */ - || TREE_CODE (TREE_TYPE (op)) == REAL_TYPE) - return false; + for (unsigned i = 0; i < 2; ++i) + { + tree op = gimple_op (stmt, i); + if (!graphite_can_represent_expr (scop_entry, loop, op) + /* We can not handle REAL_TYPE. Failed for pr39260. */ + || TREE_CODE (TREE_TYPE (op)) == REAL_TYPE) + return false; + } return true; } |