diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-04-29 18:18:11 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-04-29 18:18:11 +0200 |
commit | cc3a5b33bae232329f4d02a3a8e391623ceeb5c0 (patch) | |
tree | 7e1e3c5912be6b6c60bd5070c6e75bf61afe703b /gcc/ifcvt.c | |
parent | bc36c711daea959554c32389a1b28da682257b38 (diff) | |
download | gcc-cc3a5b33bae232329f4d02a3a8e391623ceeb5c0.zip gcc-cc3a5b33bae232329f4d02a3a8e391623ceeb5c0.tar.gz gcc-cc3a5b33bae232329f4d02a3a8e391623ceeb5c0.tar.bz2 |
re PR rtl-optimization/80491 (Compiler regression for long-add case.)
PR rtl-optimization/80491
* ifcvt.c (noce_process_if_block): When looking for x setter
with missing else_bb, don't check only the insn right before
cond_earliest, but look for the last insn that x is modified in
within the same bb.
From-SVN: r247410
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r-- | gcc/ifcvt.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index e51ccab..75458589 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -3440,7 +3440,14 @@ noce_process_if_block (struct noce_if_info *if_info) } else { - insn_b = prev_nonnote_nondebug_insn (if_info->cond_earliest); + insn_b = if_info->cond_earliest; + do + insn_b = prev_nonnote_nondebug_insn (insn_b); + while (insn_b + && (BLOCK_FOR_INSN (insn_b) + == BLOCK_FOR_INSN (if_info->cond_earliest)) + && !modified_in_p (x, insn_b)); + /* We're going to be moving the evaluation of B down from above COND_EARLIEST to JUMP. Make sure the relevant data is still intact. */ |