[Bug target/50603] [x32] Unnecessary lea
hjl.tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Oct 3 20:58:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50603
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |UNCONFIRMED
Ever Confirmed|1 |0
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2011-10-03 20:57:53 UTC ---
I am testing this patch:
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 7e89dbd..612fcd2 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -15713,6 +15713,16 @@ ix86_fixup_binary_operands (enum rtx_code code, enum
ma
chine_mode mode,
else
src2 = force_reg (mode, src2);
}
+ else
+ {
+ /* Improve address combine in x32 mode. */
+ if (TARGET_X32
+ && code == PLUS
+ && !MEM_P (dst)
+ && !MEM_P (src1)
+ && MEM_P (src2) )
+ src2 = force_reg (mode, src2);
+ }
/* If the destination is memory, and we do not have matching source
operands, do things in registers. */
More information about the Gcc-bugs
mailing list