summaryrefslogtreecommitdiff
path: root/gcc/graphite-sese-to-poly.c
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2010-08-11 20:29:51 +0000
committerSebastian Pop <spop@gcc.gnu.org>2010-08-11 20:29:51 +0000
commit4ee23fa87409de023a260a9a6f05027982a8b2c7 (patch)
tree089c19f9bbec168bf041223e62e71a1e2c7ce4e9 /gcc/graphite-sese-to-poly.c
parent1c2a7491be7c2f03af404ace3956ad2bc356afae (diff)
downloadgcc-4ee23fa87409de023a260a9a6f05027982a8b2c7.tar.gz
Call scev_analyzable_p only on is_gimple_reg.
2010-07-26 Sebastian Pop <sebastian.pop@amd.com> * graphite-sese-to-poly.c (rewrite_commutative_reductions_out_of_ssa_loop): Call scev_analyzable_p only on is_gimple_reg * gcc.dg/graphite/id-25.c: New. From-SVN: r163158
Diffstat (limited to 'gcc/graphite-sese-to-poly.c')
-rw-r--r--gcc/graphite-sese-to-poly.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 574a25b2213..ae8518f6981 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -2950,12 +2950,15 @@ rewrite_commutative_reductions_out_of_ssa_loop (loop_p loop,
{
gimple_stmt_iterator gsi;
edge exit = single_exit (loop);
+ tree res;
if (!exit)
return;
for (gsi = gsi_start_phis (exit->dest); !gsi_end_p (gsi); gsi_next (&gsi))
- if (!scev_analyzable_p (gimple_phi_result (gsi_stmt (gsi)), region))
+ if ((res = gimple_phi_result (gsi_stmt (gsi)))
+ && is_gimple_reg (res)
+ && !scev_analyzable_p (res, region))
rewrite_commutative_reductions_out_of_ssa_close_phi (gsi_stmt (gsi),
reductions);
}