// Skip constant shift instruction which may be generated by Splitting GEPs.
if (FirstOffsetDef && FirstOffsetDef->isShift() &&
- dyn_cast<ConstantInt>(FirstOffsetDef->getOperand(1)))
+ isa<ConstantInt>(FirstOffsetDef->getOperand(1)))
FirstOffsetDef = dyn_cast<Instruction>(FirstOffsetDef->getOperand(0));
// Give up if FirstOffsetDef is an Add or Sub with constant.
if (BinaryOperator *BO = dyn_cast<BinaryOperator>(FirstOffsetDef)) {
unsigned opc = BO->getOpcode();
if ((opc == Instruction::Add || opc == Instruction::Sub) &&
- (dyn_cast<ConstantInt>(BO->getOperand(0)) ||
- dyn_cast<ConstantInt>(BO->getOperand(1))))
+ (isa<ConstantInt>(BO->getOperand(0)) ||
+ isa<ConstantInt>(BO->getOperand(1))))
return false;
}
return true;