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 | 743b3fd196e027fadb4ea890cd2289e63bcfd5f5 (patch) | |
tree | 4956183892c353fee2dc82b4f3f3da2f9cfb2099 | |
parent | f628ecd15f62d7dd4e9b56fd72e47de6cbf31ebe (diff) | |
download | bcm5719-llvm-743b3fd196e027fadb4ea890cd2289e63bcfd5f5.tar.gz bcm5719-llvm-743b3fd196e027fadb4ea890cd2289e63bcfd5f5.zip |
use getArgOperand (corrected by CallInst::ArgOffset) instead of getOperand
llvm-svn: 107273
-rw-r--r-- | llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp index f645a5a1c4a..272066c8c0c 100644 --- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/llvm/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; } |