Skip to content

Commit 91865ac

Browse files
authored
Use isa instead of !dyn_cast (#137344)
1 parent 559a50c commit 91865ac

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

llvm/lib/IR/Instruction.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ bool Instruction::hasNonDebugLocLoopMetadata() const {
490490
// the first item because it is a self-reference.
491491
for (const MDOperand &Op : llvm::drop_begin(LoopMD->operands())) {
492492
// check for debug location type by attempting a cast.
493-
if (!dyn_cast<DILocation>(Op)) {
493+
if (!isa<DILocation>(Op)) {
494494
return true;
495495
}
496496
}

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8751,7 +8751,7 @@ foldBinOpIntoSelectIfProfitable(SDNode *BO, SelectionDAG &DAG,
87518751

87528752
unsigned ConstSelOpNo = 1;
87538753
unsigned OtherSelOpNo = 2;
8754-
if (!dyn_cast<ConstantSDNode>(Sel->getOperand(ConstSelOpNo))) {
8754+
if (!isa<ConstantSDNode>(Sel->getOperand(ConstSelOpNo))) {
87558755
ConstSelOpNo = 2;
87568756
OtherSelOpNo = 1;
87578757
}

llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1656,7 +1656,7 @@ class StrlenVerifier {
16561656
// We only want RecAddExpr with recurrence step that is constant. This
16571657
// is good enough for all the idioms we want to recognize. Later we expand
16581658
// and materialize the recurrence as {base,+,a} -> (base + a * strlen)
1659-
if (!dyn_cast<SCEVConstant>(AddRecEv->getStepRecurrence(*SE)))
1659+
if (!isa<SCEVConstant>(AddRecEv->getStepRecurrence(*SE)))
16601660
return false;
16611661
}
16621662

0 commit comments

Comments
 (0)