https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70302
Ilya Enkovich <ienkovich at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ienkovich at gcc dot gnu.org --- Comment #2 from Ilya Enkovich <ienkovich at gcc dot gnu.org> --- It is another case of uninitialized register usage. This time uninitialized value is used in instructions we convert. I'm testing this patch: diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index 3d8dbc4..46b410b 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -3411,8 +3411,25 @@ scalar_chain::convert_op (rtx *op, rtx_insn *insn) } else { - gcc_assert (SUBREG_P (*op)); - gcc_assert (GET_MODE (*op) == V2DImode); + if (REG_P (*op)) + { + /* We may have not converted register usage in case + this register has no definition. Otherwise it + should be converted in convert_reg. */ + df_ref ref; + FOR_EACH_INSN_USE (ref, insn) + if (DF_REF_REGNO (ref) == REGNO (*op)) + { + gcc_assert (!DF_REF_CHAIN (ref)); + break; + } + *op = gen_rtx_SUBREG (V2DImode, *op, 0); + } + else + { + gcc_assert (SUBREG_P (*op)); + gcc_assert (GET_MODE (*op) == V2DImode); + } } }