// If there is no immediate value, skip the next part.
if (SCEVConstant *SC = dyn_cast<SCEVConstant>(Imm))
- if (SC->getValue()->isNullValue())
+ if (SC->getValue()->isZero())
return Rewriter.expandCodeFor(NewBase, BaseInsertPt,
OperandValToReplace->getType());
SeparateSubExprs(SubExprs, SARE->getOperand(0));
}
} else if (!isa<SCEVConstant>(Expr) ||
- !cast<SCEVConstant>(Expr)->getValue()->isNullValue()) {
+ !cast<SCEVConstant>(Expr)->getValue()->isZero()) {
// Do not add zero.
SubExprs.push_back(Expr);
}
///
static bool isZero(SCEVHandle &V) {
if (SCEVConstant *SC = dyn_cast<SCEVConstant>(V))
- return SC->getValue()->getZExtValue() == 0;
+ return SC->getValue()->isZero();
return false;
}
// are reusing an IV, it has not been used to initialize the PHI node.
// Add it to the expression used to rewrite the uses.
if (!isa<ConstantInt>(CommonBaseV) ||
- !cast<ConstantInt>(CommonBaseV)->isNullValue())
+ !cast<ConstantInt>(CommonBaseV)->isZero())
RewriteExpr = SCEVAddExpr::get(RewriteExpr,
SCEVUnknown::get(CommonBaseV));
}
// Now that we know what we need to do, insert code before User for the
// immediate and any loop-variant expressions.
- if (!isa<ConstantInt>(BaseV) || !cast<ConstantInt>(BaseV)->isNullValue())
+ if (!isa<ConstantInt>(BaseV) || !cast<ConstantInt>(BaseV)->isZero())
// Add BaseV to the PHI value if needed.
RewriteExpr = SCEVAddExpr::get(RewriteExpr, SCEVUnknown::get(BaseV));