Fix PR43475: ICE generated by regmove

Jeff Law law@redhat.com
Mon Mar 22 16:27:00 GMT 2010


On 03/22/10 08:56, Michael Matz wrote:
> Hi,
>
> when doing the sign/zero-extension changes (move an extension of a memory
> load directly to the load) optimize_reg_copy_3 fixes up the intermediate
> instructions between the load and the last use.  It does so by using
> validate_replace_rtx_group, which only replaces in PATTERN(insn), hence
> misses any REG_EQUAL or REG_EQUIV notes, which later leads to the ICE.
>
> Instead of adding yet another wrapper around validate_replace_rtx_1 which
> also looks at notes, I instead changed validate_replace_rtx_group directly
> to also replace in REG_EQUAL/REG_EQUIV notes.  These should be the only
> ones needing treatment, and in particular replacing in
> DEAD/INC/DEP*/UNUSED and so on is actually wrong.
>
> As there are only four callers of that routines, two of them in regmove
> being problematic, one in regmove for DEBUG_INSNs, hence harmless, and one
> in reload1.c for AUTO_INC_DEC, where at best it's also correct to change
> the equal/equiv expressions, this patch should be relatively safe.
>
> Regstrapped on x86_64-linux, all langs+Ada, no regressions.  Okay for
> trunk?
>    
OK.
Jeff



More information about the Gcc-patches mailing list