OSDN Git Service

2010-06-30 H.J. Lu <hongjiu.lu@intel.com>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Jun 2010 09:47:25 +0000 (09:47 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 30 Jun 2010 09:47:25 +0000 (09:47 +0000)
PR target/44721
* config/i386/i386.md (peephole2 for arithmetic ops with memory):
Fix last commit.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@161594 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/i386/i386.md

index bd7f730..4d3dd57 100644 (file)
@@ -1,3 +1,9 @@
+2010-06-30  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR target/44721
+       * config/i386/i386.md (peephole2 for arithmetic ops with memory):
+       Fix last commit.
+
 2010-06-30  Nick Clifton  <nickc@redhat.com>
 
        * config/rx/rx-modes.def: New file.
index 7003f52..c450c38 100644 (file)
 ;;  leal    (%edx,%eax,4), %eax
 
 (define_peephole2
-  [(match_scratch:SI 5 "r")
+  [(match_scratch:P 5 "r")
    (parallel [(set (match_operand 0 "register_operand" "")
                   (ashift (match_operand 1 "register_operand" "")
                           (match_operand 2 "const_int_operand" "")))
 
   operands[1] = gen_rtx_PLUS (Pmode, base,
                              gen_rtx_MULT (Pmode, index, GEN_INT (scale)));
-  if (mode != Pmode)
-    operands[1] = gen_rtx_SUBREG (mode, operands[1], 0);
   operands[5] = base;
+  if (mode != Pmode)
+    {
+      operands[1] = gen_rtx_SUBREG (mode, operands[1], 0);
+      operands[5] = gen_rtx_SUBREG (mode, operands[5], 0);
+    }
   operands[0] = dest;
 })
 \f