Hi!

This is another RTL sharing bug, tmp is created through gen_rtx_SUBREG
and so shouldn't be shared by the move insn with the following insn that
uses it.

Bootstrapped/regtested on x86_64-linux and i686-linux
(--enable-checking=yes,rtl,extra), ok for trunk?

2016-11-30  Jakub Jelinek  <ja...@redhat.com>

        * config/i386/i386.c (dimode_scalar_chain::convert_op): Avoid
        sharing the SUBREG rtx between move and following insn.

--- gcc/config/i386/i386.c.jj   2016-11-30 10:07:26.000000000 +0100
+++ gcc/config/i386/i386.c      2016-11-30 11:10:21.009991127 +0100
@@ -3723,7 +3723,7 @@ dimode_scalar_chain::convert_op (rtx *op
          emit_insn_before (seq, insn);
        }
 
-      emit_insn_before (gen_move_insn (tmp, vec_cst), insn);
+      emit_insn_before (gen_move_insn (copy_rtx (tmp), vec_cst), insn);
       *op = tmp;
     }
   else

        Jakub

Reply via email to