re PR rtl-optimization/83213 (peephole bug with -O2)
authorJakub Jelinek <jakub@redhat.com>
Tue, 16 Jan 2018 08:54:03 +0000 (09:54 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 16 Jan 2018 08:54:03 +0000 (09:54 +0100)
PR rtl-optimization/83213
* recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
to last if both are JUMP_INSNs.

From-SVN: r256728

gcc/ChangeLog
gcc/recog.c

index 69ed57a5b509cf35793a49543f39be4af87bf455..026e8a89d0cc799b596063ba54c62e93cd0ae3cc 100644 (file)
@@ -1,5 +1,9 @@
 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
 
+       PR rtl-optimization/83213
+       * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
+       to last if both are JUMP_INSNs.
+
        PR tree-optimization/83843
        * gimple-ssa-store-merging.c
        (imm_store_chain_info::output_merged_store): Handle bit_not_p on
index cc28b71ba48fee503d2595f141f918d6ef4e897c..af6a6b01d88cea8fb843cc8a1e5467d062c0f9ed 100644 (file)
@@ -3446,6 +3446,8 @@ peep2_attempt (basic_block bb, rtx_insn *insn, int match_len, rtx_insn *attempt)
   last = emit_insn_after_setloc (attempt,
                                 peep2_insn_data[i].insn,
                                 INSN_LOCATION (peepinsn));
+  if (JUMP_P (peepinsn) && JUMP_P (last))
+    CROSSING_JUMP_P (last) = CROSSING_JUMP_P (peepinsn);
   before_try = PREV_INSN (insn);
   delete_insn_chain (insn, peep2_insn_data[i].insn, false);