Skip to content

Commit 1ac3071

Browse files
committed
[VPlan] Fix header phi VPInstruction verification. NFC
Noticed this when checking the invariant that all phis in the header block must be header phis. I think there's a missing set of parentheses here, since otherwise it only cast<VPInstruction> when RecipeI isn't a VPInstruction.
1 parent ebf96f9 commit 1ac3071

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ bool VPlanVerifier::verifyPhiRecipes(const VPBasicBlock *VPBB) {
8080
NumActiveLaneMaskPhiRecipes++;
8181

8282
if (IsHeaderVPBB && !isa<VPHeaderPHIRecipe, VPWidenPHIRecipe>(*RecipeI) &&
83-
!isa<VPInstruction>(*RecipeI) &&
84-
cast<VPInstruction>(RecipeI)->getOpcode() == Instruction::PHI) {
83+
!(isa<VPInstruction>(*RecipeI) &&
84+
cast<VPInstruction>(RecipeI)->getOpcode() == Instruction::PHI)) {
8585
errs() << "Found non-header PHI recipe in header VPBB";
8686
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
8787
errs() << ": ";

0 commit comments

Comments
 (0)