diff options
author | Richard Biener <rguenther@suse.de> | 2015-02-16 14:52:14 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2015-02-16 14:52:14 +0000 |
commit | a933d47ffaa30ef3c02117ed3e1835758ff2813c (patch) | |
tree | beb41938260fc4615ba7775f99d4c141516fbeed /gcc/tree-predcom.c | |
parent | 62991c35a8070efed1af4a46f64151cc4e95207e (diff) |
re PR tree-optimization/63593 (ICE: verify_gimple failed: incompatible types in PHI argument 0 with -O3 -fno-tree-vectorize)
2015-02-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/63593
* tree-predcom.c (execute_pred_commoning_chain): Delay removing
stmts and releasing SSA names until...
(execute_pred_commoning): ... after processing all chains.
* gcc.dg/pr63593.c: New testcase.
From-SVN: r220734
Diffstat (limited to 'gcc/tree-predcom.c')
-rw-r--r-- | gcc/tree-predcom.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/gcc/tree-predcom.c b/gcc/tree-predcom.c index ac32c849a12..8dac1ba5afd 100644 --- a/gcc/tree-predcom.c +++ b/gcc/tree-predcom.c @@ -1745,9 +1745,8 @@ execute_pred_commoning_chain (struct loop *loop, chain_p chain, if (chain->combined) { /* For combined chains, just remove the statements that are used to - compute the values of the expression (except for the root one). */ - for (i = 1; chain->refs.iterate (i, &a); i++) - remove_stmt (a->stmt); + compute the values of the expression (except for the root one). + We delay this until after all chains are processed. */ } else { @@ -1811,6 +1810,21 @@ execute_pred_commoning (struct loop *loop, vec<chain_p> chains, execute_pred_commoning_chain (loop, chain, tmp_vars); } + FOR_EACH_VEC_ELT (chains, i, chain) + { + if (chain->type == CT_INVARIANT) + ; + else if (chain->combined) + { + /* For combined chains, just remove the statements that are used to + compute the values of the expression (except for the root one). */ + dref a; + unsigned j; + for (j = 1; chain->refs.iterate (j, &a); j++) + remove_stmt (a->stmt); + } + } + update_ssa (TODO_update_ssa_only_virtuals); } |