This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: PR target/41665: Typo in addsi_1_zext?


Hi,

This patch gets the proper operand for lea. OK for trunk and active
branches?

Thanks.


H.J.
----
2009-10-11  H.J. Lu  <hongjiu.lu@intel.com>

	PR target/41665
	* config/i386/i386.md (addsi_1_zext): Get the proper second
	operand for lea.

diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 12bea83..3ede59a 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -6491,7 +6491,7 @@
   switch (get_attr_type (insn))
     {
     case TYPE_LEA:
-      operands[2] = SET_SRC (XVECEXP (PATTERN (insn), 0, 0));
+      operands[2] = XEXP (SET_SRC (XVECEXP (PATTERN (insn), 0, 0)), 0);
       return "lea{l}\t{%a2, %k0|%k0, %a2}";
 
     case TYPE_INCDEC:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]