From 8db3f2c2ab563167e60ef88cd13445d9a0f07333 Mon Sep 17 00:00:00 2001 From: Gabor Greif Date: Fri, 16 Apr 2010 00:06:45 +0000 Subject: [PATCH] shift intrinsic operand git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101423 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/CodeGenPrepare.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index 93e9bfbe35a..e13d0647874 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -559,7 +559,7 @@ bool CodeGenPrepare::OptimizeCallInst(CallInst *CI) { // Lower all uses of llvm.objectsize.* IntrinsicInst *II = dyn_cast(CI); if (II && II->getIntrinsicID() == Intrinsic::objectsize) { - bool Min = (cast(II->getOperand(2))->getZExtValue() == 1); + bool Min = (cast(II->getOperand(1))->getZExtValue() == 1); const Type *ReturnTy = CI->getType(); Constant *RetVal = ConstantInt::get(ReturnTy, Min ? 0 : -1ULL); CI->replaceAllUsesWith(RetVal);