[llvm-commits] [llvm] r107273 - /llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
Gabor Greif
ggreif at gmail.com
Wed Jun 30 02:19:23 PDT 2010
Author: ggreif
Date: Wed Jun 30 04:19:23 2010
New Revision: 107273
URL: http://llvm.org/viewvc/llvm-project?rev=107273&view=rev
Log:
use getArgOperand (corrected by CallInst::ArgOffset) instead of getOperand
Modified:
llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=107273&r1=107272&r2=107273&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Wed Jun 30 04:19:23 2010
@@ -548,7 +548,8 @@
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;
}
More information about the llvm-commits
mailing list