diff options
author | Bill Schmidt <wschmidt@linux.ibm.com> | 2018-05-25 19:12:16 +0000 |
---|---|---|
committer | William Schmidt <wschmidt@gcc.gnu.org> | 2018-05-25 19:12:16 +0000 |
commit | 9d502741aa65321078d059865865bdc93af445b6 (patch) | |
tree | ac946ba4b31932cfb8ff396e07f0760fccaebab1 | |
parent | 1afe3e77e8dbc2ad680bab46f7637975f8c3cdfb (diff) | |
download | gcc-9d502741aa65321078d059865865bdc93af445b6.zip gcc-9d502741aa65321078d059865865bdc93af445b6.tar.gz gcc-9d502741aa65321078d059865865bdc93af445b6.tar.bz2 |
re PR tree-optimization/85712 (ICE in all_phi_incrs_profitable_1 at gcc/gimple-ssa-strength-reduction.c:3479)
2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
PR tree-optimization/85712
* gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
this candidate has already been replaced in-situ by a copy.
From-SVN: r260772
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/gimple-ssa-strength-reduction.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a1ef11e..aef4d9a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com> + + PR tree-optimization/85712 + * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if + this candidate has already been replaced in-situ by a copy. + 2018-05-25 Jason Merrill <jason@redhat.com> PR c++/80485 - inline function non-zero address. diff --git a/gcc/gimple-ssa-strength-reduction.c b/gcc/gimple-ssa-strength-reduction.c index a4e5a52..b86ce85 100644 --- a/gcc/gimple-ssa-strength-reduction.c +++ b/gcc/gimple-ssa-strength-reduction.c @@ -3662,6 +3662,11 @@ replace_one_candidate (slsr_cand_t c, unsigned i, tree basis_name) orig_rhs2 = gimple_assign_rhs2 (c->cand_stmt); cand_incr = cand_increment (c); + /* If orig_rhs2 is NULL, we have already replaced this in situ with + a copy statement under another interpretation. */ + if (!orig_rhs2) + return; + if (dump_file && (dump_flags & TDF_DETAILS)) { fputs ("Replacing: ", dump_file); |