summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Scalar')
-rw-r--r--llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp b/llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
index d024bc05f38..86a10d2a161 100644
--- a/llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
+++ b/llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp
@@ -1214,7 +1214,7 @@ bool SeparateConstOffsetFromGEP::isLegalToSwapOperand(
// 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.
@@ -1223,8 +1223,8 @@ bool SeparateConstOffsetFromGEP::isLegalToSwapOperand(
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;
OpenPOWER on IntegriCloud