summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2010-04-16 23:37:20 +0000
committerEric Christopher <echristo@apple.com>2010-04-16 23:37:20 +0000
commit7258dcd77f19bf5adb5f76d4c2bb5fc426ba75c2 (patch)
treec2f3cc1957d7ba72772b73e9f98ca4d55ab5cfdf /llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
parent4ebae65d6af71115de86273e6b27f67e2cde2be7 (diff)
downloadbcm5719-llvm-7258dcd77f19bf5adb5f76d4c2bb5fc426ba75c2.tar.gz
bcm5719-llvm-7258dcd77f19bf5adb5f76d4c2bb5fc426ba75c2.zip
Revert 101465, it broke internal OpenGL testing.
Probably the best way to know that all getOperand() calls have been handled is to replace that API instead of updating. llvm-svn: 101579
Diffstat (limited to 'llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
index e13d0647874..93e9bfbe35a 100644
--- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
+++ b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp
@@ -559,7 +559,7 @@ bool CodeGenPrepare::OptimizeCallInst(CallInst *CI) {
// Lower all uses of llvm.objectsize.*
IntrinsicInst *II = dyn_cast<IntrinsicInst>(CI);
if (II && II->getIntrinsicID() == Intrinsic::objectsize) {
- bool Min = (cast<ConstantInt>(II->getOperand(1))->getZExtValue() == 1);
+ bool Min = (cast<ConstantInt>(II->getOperand(2))->getZExtValue() == 1);
const Type *ReturnTy = CI->getType();
Constant *RetVal = ConstantInt::get(ReturnTy, Min ? 0 : -1ULL);
CI->replaceAllUsesWith(RetVal);
OpenPOWER on IntegriCloud