diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-04-16 01:16:20 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-04-16 01:16:20 +0000 |
commit | 403e9694f9e284cb145bb6f40b1b7c9f70a125f1 (patch) | |
tree | 1b7aaa95239227c67473d032a9dfae5b48c122d2 /llvm/lib/CodeGen/GCStrategy.cpp | |
parent | 393e08536dbe9ca338c6d15a97731737c174ce7b (diff) | |
download | bcm5719-llvm-403e9694f9e284cb145bb6f40b1b7c9f70a125f1.tar.gz bcm5719-llvm-403e9694f9e284cb145bb6f40b1b7c9f70a125f1.zip |
back out r101423 and r101397, they break llvm-gcc self-host on darwin10
llvm-svn: 101434
Diffstat (limited to 'llvm/lib/CodeGen/GCStrategy.cpp')
-rw-r--r-- | llvm/lib/CodeGen/GCStrategy.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/GCStrategy.cpp b/llvm/lib/CodeGen/GCStrategy.cpp index 97826cdf2a0..790cb216489 100644 --- a/llvm/lib/CodeGen/GCStrategy.cpp +++ b/llvm/lib/CodeGen/GCStrategy.cpp @@ -271,7 +271,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(); } @@ -279,7 +279,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(); @@ -290,7 +290,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: |