Why can't CSE recognize const_int's in HIGH LO_SUM pair?

John David Anglin dave@hiauly1.hia.nrc.ca
Sat Sep 8 10:18:00 GMT 2001


> > Why are you using high/lo_sum for constants?  high/lo_sum has
> > rather loose semantics, and you can't pull much information
> > from them.
> >
> > Better would be to emit the actual constants that the insns
> > in question will load into the hardware registers.
> 
> Can we assume that an expression of the form (lo_sum (reg) (constant))
> always has the same value as the constant itself?  That could possibly
> help CSE.

I am fairly certain that it is true on the PA.  In fact, I think more
generally the form (lo_sum (reg) (rtx)) is always equivalent to (rtx).
(reg) is always (high (rtx)).  If this is not true on all ports, possibly
a flag bit (unchanging?) could be set in the LO_SUM to indicate this.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)



More information about the Gcc mailing list