This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/49781] [x32] Unnecessary lea in x32 mode
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 8 Aug 2011 17:17:05 +0000
- Subject: [Bug target/49781] [x32] 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 #37 from Uros Bizjak <ubizjak at gmail dot com> 2011-08-08 17:16:44 UTC ---
(In reply to comment #35)
> It works much better now. But gcc.dg/torture/pr47744-2.c compiled with
>
> -mx32 -O3 -std=gnu99 -ftree-vectorize -funroll-loops
>
> still generates those leal:
>
> leal (%rsi,%r9), %ebp
> leal (%r10,%r9), %r12d
> leal (%r10,%r9), %r12d
This partial address won't combine due to multiple uses.
IIRC, there was some discussion to distribute partial addresses back to their
use sites, but OTOH it all depends on how hard you want to hammer your address
generation unit.