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: Bernd Schmidt <bernds at redhat dot com>
- Date: Sat, 8 Sep 2001 10:27:54 +0100 (BST)
- cc: John David Anglin <dave at hiauly1 dot hia dot nrc dot ca>, <gcc at gcc dot gnu dot org>
On Fri, 7 Sep 2001, Richard Henderson wrote:
> On Fri, Sep 07, 2001 at 07:07:12PM -0400, John David Anglin wrote:
> > (insn/i 24 70 25 (set (reg:SI 99)
> > (high:SI (const_int 20000 [0x4e20]))) -1 (nil)
> > (nil))
> >
> > (insn/i 25 24 26 (set (reg:SI 100)
> > (lo_sum:SI (reg:SI 99)
> > (const_int 20000 [0x4e20]))) -1 (nil)
> > (nil))
>
> 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.
Bernd