use getArgOperand (corrected by CallInst::ArgOffset) instead of getOperand

llvm-svn: 107273
This commit is contained in:
Gabor Greif 2010-06-30 09:19:23 +00:00
parent f628ecd15f
commit 743b3fd196
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}