[llvm-commits] [llvm] r53714 - /llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

Mon P Wang wangmp at apple.com
Wed Jul 16 21:54:07 PDT 2008


Author: wangmp
Date: Wed Jul 16 23:54:06 2008
New Revision: 53714

URL: http://llvm.org/viewvc/llvm-project?rev=53714&view=rev
Log:
When lowering certain atomics, we need to copy the memoperand from the old
atomic operation to the new one.

Modified:
    llvm/trunk/lib/Target/X86/X86ISelLowering.cpp

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

==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Wed Jul 16 23:54:06 2008
@@ -6010,7 +6010,9 @@
   for (int i=0; i <= lastAddrIndx; ++i)
     (*MIB).addOperand(*argOpers[i]);
   MIB.addReg(t2);
-  
+  assert(bInstr->hasOneMemOperand() && "Unexpected number of memoperand");
+  (*MIB).addMemOperand(*F, *bInstr->memoperands_begin());
+
   MIB = BuildMI(newMBB, TII->get(X86::MOV32rr), destOper.getReg());
   MIB.addReg(X86::EAX);
   
@@ -6107,6 +6109,8 @@
   for (int i=0; i <= lastAddrIndx; ++i)
     (*MIB).addOperand(*argOpers[i]);
   MIB.addReg(t3);
+  assert(mInstr->hasOneMemOperand() && "Unexpected number of memoperand");
+  (*MIB).addMemOperand(*F, *mInstr->memoperands_begin());
   
   MIB = BuildMI(newMBB, TII->get(X86::MOV32rr), destOper.getReg());
   MIB.addReg(X86::EAX);





More information about the llvm-commits mailing list