diff options
author | Bill Schmidt <wschmidt@linux.vnet.ibm.com> | 2014-04-02 22:07:30 +0000 |
---|---|---|
committer | William Schmidt <wschmidt@gcc.gnu.org> | 2014-04-02 22:07:30 +0000 |
commit | 1e386bb8227491625e10fc31160c88c3ae08428c (patch) | |
tree | 0ab3d6f4ca0a169616ae2196f21d9ffc7687fd49 /gcc/gimple-ssa-strength-reduction.c | |
parent | f4581282e57ef0f609b21be81e641911965c3bd8 (diff) | |
download | gcc-1e386bb8227491625e10fc31160c88c3ae08428c.zip gcc-1e386bb8227491625e10fc31160c88c3ae08428c.tar.gz gcc-1e386bb8227491625e10fc31160c88c3ae08428c.tar.bz2 |
re PR tree-optimization/60733 (ICE due to SLSR on valid code at -O3 on x86_64-linux-gnu)
[gcc]
2014-04-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/60733
* gimple-ssa-strength-reduction.c (ncd_with_phi): Change required
insertion point for PHI candidates to be the end of the feeding
block for the PHI argument.
[gcc/testsuite]
2014-04-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
PR tree-optimization/60733
* gcc.dg/torture/pr60733.c: New test.
From-SVN: r209040
Diffstat (limited to 'gcc/gimple-ssa-strength-reduction.c')
-rw-r--r-- | gcc/gimple-ssa-strength-reduction.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c index 9320b51..9ad1b4f 100644 --- a/gcc/gimple-ssa-strength-reduction.c +++ b/gcc/gimple-ssa-strength-reduction.c @@ -3001,10 +3001,10 @@ ncd_with_phi (slsr_cand_t c, double_int incr, gimple phi, { slsr_cand_t arg_cand = base_cand_from_table (arg); double_int diff = arg_cand->index - basis->index; + basic_block pred = gimple_phi_arg_edge (phi, i)->src; if ((incr == diff) || (!address_arithmetic_p && incr == -diff)) - ncd = ncd_for_two_cands (ncd, gimple_bb (arg_cand->cand_stmt), - *where, arg_cand, where); + ncd = ncd_for_two_cands (ncd, pred, *where, NULL, where); } } } |