Patch: disable invalid REG_EQUAL note
Andrew Pinski
pinskia@physics.uc.edu
Fri Apr 30 03:09:00 GMT 2004
On Apr 29, 2004, at 20:55, Dale Johannesen wrote:
> This addresses a bug that shows up building perlbmk (SPEC) in LNO
> branch.
> cse pastes together the high and low parts of
>
> (CONST (MINUS (LABEL_REF) (0)))
>
> each valid in context, into a REG_EQUAL; this propagates into the RHS
> of an
> assignment without being validated, and since it is not in fact valid,
> an ICE results.
> There's already a case where a similar pasting is disallowed, so I'd
> like to add
> this one. (I don't know why it happens only in LNO branch.)
> (It seems obvious to approach this instead by getting rid of the
> redundant MINUS 0,
> but that turns out to lead into some very dusty twisty little passages
> of the
> darwin-specific address generation code.) Bootstrapped and tested on
> darwin.
>
> 2004-04-29 Dale Johannesen <dalej@apple.com>
>
> * cse.c (cse_insn): Disallow construction of
> (CONST (MINUS (LABEL_REF) (0))) in a REG_EQUAL note.
The only thing I could see what is wrong with this is the call to
rtx_equal_p to
see if the rtx is zero as constants are always shared and are always
the same so a
simple equals will be fine here (and for speed it is better as
rtx_equal_p has a semi
large epilogue especially for checking to see if something is equal to
a constant).
Thanks,
Andrew Pinski
More information about the Gcc-patches
mailing list