This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/49281] lea_general_4 is wrong
- 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: Sat, 4 Jun 2011 15:17:09 +0000
- Subject: [Bug target/49281] lea_general_4 is wrong
- Auto-submitted: auto-generated
- References: <bug-49281-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49281
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.7.0
Summary|lea_general_4 doesn't work |lea_general_4 is wrong
|for x32 |
--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> 2011-06-04 15:16:38 UTC ---
I don't think from
movl %eax, %ecx
orl $1, %ecx
sall $2, %ecx
to
leal 4(,%rax,4), %ecx
is valid transformation. For EAX == 43,
leal 4(,%rax,4), %ecx
gives "43*4 + 4" == 176. But
movl %eax, %ecx
orl $1, %ecx
sall $2, %ecx
gives "(43 | 1) << 2" == 172. I don't see how it can work.