This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/49781] Unnecessary lea in x32 mode
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 19 Jul 2011 13:06:52 +0000
- Subject: [Bug target/49781] Unnecessary lea in x32 mode
- Auto-submitted: auto-generated
- References: <bug-49781-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49781
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2011-07-19 13:06:19 UTC ---
(In reply to comment #1)
> (In reply to comment #0)
>
> > Many lea insns can be combined with the load/store insn followed.
>
> No, these are leal insns, they have inherent zero_extend from SImode and they
> clear upper 32bits before address is passed to load/store insn.
There are 2 ways to address this:
1. Use addr_32 prefix.
2. If address wrap-around is ignored, we can use the address as is.