This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Why can't CSE recognize const_int's in HIGH LO_SUM pair?
- To: Richard Henderson <rth at redhat dot com>
- Subject: Re: Why can't CSE recognize const_int's in HIGH LO_SUM pair?
- From: law at redhat dot com
- Date: Mon, 10 Sep 2001 12:51:46 -0600
- cc: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>, Bernd Schmidt <bernds at redhat dot com>, gcc at gcc dot gnu dot org
- Reply-To: law at redhat dot com
In message <20010910104403.E8881@redhat.com>you write:
> On Mon, Sep 10, 2001 at 11:29:56AM -0600, law@redhat.com wrote:
> > True. But with the way things are currently implemented I don't think
> > we actually lose anything on the PA by not exposing the subexpressions
> > to gcse. Instead of commonizing the HIGH and LO_SUM parts with other
> > idential ones elsewhere, we end up commonizing (set (reg) (const_int))
>
> Consider
>
> (set (reg A) (const_int 0x10001))
> (set (reg B) (const_int 0x10002))
>
> as
>
> (set (reg T) (const_int 0x10000))
> (set (reg A) (plus (reg T) (const_int 1)))
> (set (reg B) (plus (reg T) (const_int 2)))
>
> Now consider A and B loaded on two different paths. Code motion can
> then pull T up into the dominator.
But recall that we don't do this right now on the PA due to implementation
issues.
jeff