summaryrefslogtreecommitdiff
path: root/lib/CodeGen/GCStrategy.cpp
diff options
context:
space:
mode:
authorGabor Greif <ggreif@gmail.com>2010-04-15 12:46:56 +0000
committerGabor Greif <ggreif@gmail.com>2010-04-15 12:46:56 +0000
commit9ee17208115482441953127615231c59a2f4d052 (patch)
treefea1c2465e14ae8c3d89e0cf07588155acf8a23d /lib/CodeGen/GCStrategy.cpp
parent45d95a1ad5eb72c65db8cc691a10339aa7c9c024 (diff)
downloadllvm-9ee17208115482441953127615231c59a2f4d052.tar.gz
llvm-9ee17208115482441953127615231c59a2f4d052.tar.bz2
llvm-9ee17208115482441953127615231c59a2f4d052.tar.xz
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
Diffstat (limited to 'lib/CodeGen/GCStrategy.cpp')
-rw-r--r--lib/CodeGen/GCStrategy.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/GCStrategy.cpp b/lib/CodeGen/GCStrategy.cpp
index f573b32e74..6d7cc51547 100644
--- a/lib/CodeGen/GCStrategy.cpp
+++ b/lib/CodeGen/GCStrategy.cpp
@@ -270,7 +270,7 @@ bool LowerIntrinsics::PerformDefaultLowering(Function &F, GCStrategy &S) {
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 @@ bool LowerIntrinsics::PerformDefaultLowering(Function &F, GCStrategy &S) {
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 @@ bool LowerIntrinsics::PerformDefaultLowering(Function &F, GCStrategy &S) {
// 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: