http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51933
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-21 15:57:23 UTC --- Completely untested fix: --- gcc/ree.c.jj 2011-12-28 10:52:44.000000000 +0100 +++ gcc/ree.c 2012-01-21 16:55:27.290731139 +0100 @@ -776,6 +776,23 @@ add_removable_extension (rtx x ATTRIBUTE } return; } + else + { + rtx set = single_set (DF_REF_INSN (def->ref)); + if (set == NULL_RTX + || !REG_P (SET_DEST (set)) + || GET_MODE (SET_DEST (set)) != GET_MODE (XEXP (src, 0))) + { + if (dump_file) + { + fprintf (dump_file, "Cannot eliminate extension:\n"); + print_rtl_single (dump_file, rei->insn); + fprintf (dump_file, + " because def insn has different mode\n"); + } + return; + } + } /* Then add the candidate to the list and insert the reaching definitions into the definition map. */