diff options
author | Gabor Greif <ggreif@gmail.com> | 2010-06-30 09:19:23 +0000 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2010-06-30 09:19:23 +0000 |
commit | 6e1f330c4cb81c5495c6fd7105cd294c8079ead9 (patch) | |
tree | cb0ddc7ecb88567b5fc4f37bb95ccc2e22a107da /lib/Transforms/Scalar/CodeGenPrepare.cpp | |
parent | 237e1da16ac539aec3b6b99ed8fb64f348b6e766 (diff) |
use getArgOperand (corrected by CallInst::ArgOffset) instead of getOperand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107273 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Scalar/CodeGenPrepare.cpp')
-rw-r--r-- | lib/Transforms/Scalar/CodeGenPrepare.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index f645a5a1c4..272066c8c0 100644 --- a/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -548,7 +548,8 @@ protected: CI->eraseFromParent(); } bool isFoldable(unsigned SizeCIOp, unsigned, bool) const { - if (ConstantInt *SizeCI = dyn_cast<ConstantInt>(CI->getOperand(SizeCIOp))) + if (ConstantInt *SizeCI = dyn_cast<ConstantInt>(CI->getArgOperand(SizeCIOp + - CallInst::ArgOffset))) return SizeCI->isAllOnesValue(); return false; } |