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: Wed, 3 Aug 2011 16:09:19 +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 #12 from Uros Bizjak <ubizjak at gmail dot com> 2011-08-03 16:08:47 UTC ---
(In reply to comment #11)
> gcc.dg/torture/pr47744-2.c compiled with
>
> -mx32 -O3 -std=gnu99 -ftree-vectorize -funroll-loops
>
> generates codes like
>
> leal (%rax,%r9), %r12d
> leal (%rax,%rdi), %r10d
> mov %r12d, %edx
> movq (%r12d), %rbp
> movq 8(%rdx), %rdx
> movq (%r12d), %rax
>
> Many leal aren't necessary.
This is the tradeof for using offsetable address for DWI operands.