This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: PATCH: PR rtl-optimization/50696: [x32] Unnecessary lea


On Wed, Oct 12, 2011 at 3:40 PM, Richard Kenner
<kenner@vlsi1.ultra.nyu.edu> wrote:
>> X86 backend doesn't accept the new expression as valid address while
>> (zero_extend:DI) works just fine. ?This patches keeps ZERO_EXTEND
>> when zero-extending address to Pmode. ?It reduces number of lea from
>> 24173 to 21428 in x32 libgfortran.so. ?Does it make any senses?
>
> I'd be inclined to have the x86 backend accept combine's canonicalized
> form rather than doing a patch such as this.
>

The address format generated by combine is very unusual in
2 aspecst:

1. The placement of subreg in

(plus:DI (subreg:DI (mult:SI (reg/v:SI 85 [ i ])
                        (const_int 4 [0x4])) 0)
                (subreg:DI (reg:SI 106) 0))

isn't supported by x86 backend.

2. The biggest problem is optimizing mask 0xffffffff to
0xfffffffc by keeping track of non-zero bits in registers.
X86 backend doesn't have such information to know
ADDR & 0xfffffffc == ADDR & 0xffffffff.


-- 
H.J.


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