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?


> > 	(set (reg) (const_int 0x10000000))
> > 	(set (reg) (plus (reg) (const_int 0x1000))
> 
> I see what you saying.  Is jump expansion smart enough to figure out
> that the final result for the above is the constant 0x10001000?  I'll
> try to look into what's involved in changing to the above next week.

CSE should fold the expression and drop REG_EQUAL note containing the constant
on the second instruction. Most of passes (with an notable exception of
combiner) are aware of these notes and can use them to get the constant back.

> 
> I think what has confused the issue is that the HP assembler knows how
> to extract the high and low parts.  However, as you note, there are
> benefits to creating the high and low parts directly in the compiler.

Honza
> 
> 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]