[llvm-commits] [llvm] r55777 - in /llvm/trunk: lib/Target/X86/X86FastISel.cpp test/CodeGen/X86/fast-isel-mem.ll

Owen Anderson resistor at mac.com
Thu Sep 4 09:48:33 PDT 2008


Author: resistor
Date: Thu Sep  4 11:48:33 2008
New Revision: 55777

URL: http://llvm.org/viewvc/llvm-project?rev=55777&view=rev
Log:
Fix the ordering of operands to the store (inverted relative to LLVM IR), and fix the testcase.

Modified:
    llvm/trunk/lib/Target/X86/X86FastISel.cpp
    llvm/trunk/test/CodeGen/X86/fast-isel-mem.ll

Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=55777&r1=55776&r2=55777&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Thu Sep  4 11:48:33 2008
@@ -157,10 +157,10 @@
   X86AddressMode AM;
   if (Op1)
     // Address is in register.
-    AM.Base.Reg = Op0;
+    AM.Base.Reg = Op1;
   else
     AM.GV = cast<GlobalValue>(V);
-  addFullAddress(BuildMI(MBB, TII.get(Opc)), AM);
+  addFullAddress(BuildMI(MBB, TII.get(Opc)), AM).addReg(Op0);
   return true;
 }
 
@@ -255,6 +255,8 @@
   default: break;
   case Instruction::Load:
     return X86SelectLoad(I);
+  case Instruction::Store:
+    return X86SelectStore(I);
   }
 
   return false;

Modified: llvm/trunk/test/CodeGen/X86/fast-isel-mem.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/fast-isel-mem.ll?rev=55777&r1=55776&r2=55777&view=diff

==============================================================================
--- llvm/trunk/test/CodeGen/X86/fast-isel-mem.ll (original)
+++ llvm/trunk/test/CodeGen/X86/fast-isel-mem.ll Thu Sep  4 11:48:33 2008
@@ -1,5 +1,5 @@
 ; RUN: llvm-as < %s | llc -fast-isel -mtriple=i386-apple-darwin -mattr=sse2 | \
-; RUN:   grep mov | grep lazy_ptr | count 2
+; RUN:   grep mov | grep lazy_ptr | count 1
 
 @src = external global i32
 





More information about the llvm-commits mailing list