This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


> > 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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]