Skip to content

Commit a8edb6a

Browse files
authored
[VPlan] Improve cast code in VPlanRecipes (NFC) (#141240)
1 parent 5804545 commit a8edb6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlanRecipes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,13 +1981,13 @@ void VPWidenIntOrFpInductionRecipe::execute(VPTransformState &State) {
19811981

19821982
// Fast-math-flags propagate from the original induction instruction.
19831983
IRBuilder<>::FastMathFlagGuard FMFG(Builder);
1984-
if (ID.getInductionBinOp() && isa<FPMathOperator>(ID.getInductionBinOp()))
1984+
if (isa_and_present<FPMathOperator>(ID.getInductionBinOp()))
19851985
Builder.setFastMathFlags(ID.getInductionBinOp()->getFastMathFlags());
19861986

19871987
// Now do the actual transformations, and start with fetching the step value.
19881988
Value *Step = State.get(getStepValue(), VPLane(0));
19891989

1990-
assert((isa<PHINode>(EntryVal) || isa<TruncInst>(EntryVal)) &&
1990+
assert((isa<PHINode, TruncInst>(EntryVal)) &&
19911991
"Expected either an induction phi-node or a truncate of it!");
19921992

19931993
// Construct the initial value of the vector IV in the vector loop preheader

0 commit comments

Comments
 (0)