[llvm-branch-commits] [llvm-branch] r100471 - /llvm/branches/ggreif/CallInst-operands/lib/CodeGen/GCStrategy.cpp

Gabor Greif ggreif at gmail.com
Mon Apr 5 14:29:14 PDT 2010


Author: ggreif
Date: Mon Apr  5 16:29:14 2010
New Revision: 100471

URL: http://llvm.org/viewvc/llvm-project?rev=100471&view=rev
Log:
shift operands

Modified:
    llvm/branches/ggreif/CallInst-operands/lib/CodeGen/GCStrategy.cpp

Modified: llvm/branches/ggreif/CallInst-operands/lib/CodeGen/GCStrategy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/ggreif/CallInst-operands/lib/CodeGen/GCStrategy.cpp?rev=100471&r1=100470&r2=100471&view=diff
==============================================================================
--- llvm/branches/ggreif/CallInst-operands/lib/CodeGen/GCStrategy.cpp (original)
+++ llvm/branches/ggreif/CallInst-operands/lib/CodeGen/GCStrategy.cpp Mon Apr  5 16:29:14 2010
@@ -270,7 +270,7 @@
         case Intrinsic::gcwrite:
           if (LowerWr) {
             // Replace a write barrier with a simple store.
-            Value *St = new StoreInst(CI->getOperand(1), CI->getOperand(3), CI);
+            Value *St = new StoreInst(CI->getOperand(0), CI->getOperand(2), CI);
             CI->replaceAllUsesWith(St);
             CI->eraseFromParent();
           }
@@ -278,7 +278,7 @@
         case Intrinsic::gcread:
           if (LowerRd) {
             // Replace a read barrier with a simple load.
-            Value *Ld = new LoadInst(CI->getOperand(2), "", CI);
+            Value *Ld = new LoadInst(CI->getOperand(1), "", CI);
             Ld->takeName(CI);
             CI->replaceAllUsesWith(Ld);
             CI->eraseFromParent();
@@ -289,7 +289,7 @@
             // Initialize the GC root, but do not delete the intrinsic. The
             // backend needs the intrinsic to flag the stack slot.
             Roots.push_back(cast<AllocaInst>(
-                              CI->getOperand(1)->stripPointerCasts()));
+                              CI->getOperand(0)->stripPointerCasts()));
           }
           break;
         default:





More information about the llvm-branch-commits mailing list