[llvm] [VPlan] Verify dominance for incoming values of phi-like recipes. (PR #124838)

via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 16 08:30:19 PST 2025


================
@@ -175,6 +175,12 @@ bool VPlanVerifier::verifyEVLRecipe(const VPInstruction &EVL) const {
   });
 }
 
+/// Return true if \p R is a VPIRInstruction wrapping a phi.
+static bool isVPIRInstructionPhi(const VPRecipeBase &R) {
+  auto *VPIRI = dyn_cast<VPIRInstruction>(&R);
+  return VPIRI && isa<PHINode>(VPIRI->getInstruction());
+}
+
 bool VPlanVerifier::verifyVPBasicBlock(const VPBasicBlock *VPBB) {
   if (!verifyPhiRecipes(VPBB))
----------------
ayalz wrote:

Should the dominance verification of phi-like recipes take place inside `verifyPhiRecipes()` above rather than here?
Does `VPRecipeBase::isPhi()` need to also consider `isVPIRInstructionPhi()`?

https://github.com/llvm/llvm-project/pull/124838


More information about the llvm-commits mailing list