From: Gabor Greif Date: Wed, 30 Jun 2010 09:19:23 +0000 (+0000) Subject: use getArgOperand (corrected by CallInst::ArgOffset) instead of getOperand X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6e1f330c4cb81c5495c6fd7105cd294c8079ead9;p=oota-llvm.git 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 --- diff --git a/lib/Transforms/Scalar/CodeGenPrepare.cpp b/lib/Transforms/Scalar/CodeGenPrepare.cpp index f645a5a1c4a..272066c8c0c 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(CI->getOperand(SizeCIOp))) + if (ConstantInt *SizeCI = dyn_cast(CI->getArgOperand(SizeCIOp + - CallInst::ArgOffset))) return SizeCI->isAllOnesValue(); return false; }