Make use of ConstantInt::isZero instead of ConstantInt::isNullValue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36261 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Zhou Sheng
2007-04-19 05:39:12 +00:00
parent 223d65b651
commit 843f0767ac
3 changed files with 6 additions and 6 deletions

View File

@@ -620,7 +620,7 @@ BasicAliasAnalysis::CheckGEPInstructions(
if (NumGEP1Ops > MinOperands) {
for (unsigned i = FirstConstantOper; i != MaxOperands; ++i)
if (isa<ConstantInt>(GEP1Ops[i]) &&
!cast<Constant>(GEP1Ops[i])->isNullValue()) {
!cast<ConstantInt>(GEP1Ops[i])->isZero()) {
// Yup, there's a constant in the tail. Set all variables to
// constants in the GEP instruction to make it suiteable for
// TargetData::getIndexedOffset.