back out r101364, as it trips the linux nightlybot on some clang C++ tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101368 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/GCStrategy.cpp b/lib/CodeGen/GCStrategy.cpp
index f573b32..6d7cc51 100644
--- a/lib/CodeGen/GCStrategy.cpp
+++ b/lib/CodeGen/GCStrategy.cpp
@@ -270,7 +270,7 @@
         case Intrinsic::gcwrite:
           if (LowerWr) {
             // Replace a write barrier with a simple store.
-            Value *St = new StoreInst(CI->getOperand(0), CI->getOperand(2), CI);
+            Value *St = new StoreInst(CI->getOperand(1), CI->getOperand(3), 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(1), "", CI);
+            Value *Ld = new LoadInst(CI->getOperand(2), "", 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(0)->stripPointerCasts()));
+                              CI->getOperand(1)->stripPointerCasts()));
           }
           break;
         default: