[llvm] [VPlan] Introduce VPIRFlags::getNWFlagsOrNone (NFC) (PR #207176)

Ramkumar Ramachandra via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 01:46:36 PDT 2026


================
@@ -4118,15 +4115,15 @@ class VPCurrentIterationPHIRecipe : public VPHeaderPHIRecipe {
 class VPWidenCanonicalIVRecipe : public VPRecipeWithIRFlags {
 public:
   VPWidenCanonicalIVRecipe(VPRegionValue *CanonicalIV,
-                           const VPIRFlags::WrapFlagsTy &Flags = {false, false})
+                           const VPIRFlags::WrapFlagsTy &Flags = {})
       : VPRecipeWithIRFlags(VPRecipeBase::VPWidenCanonicalIVSC, CanonicalIV,
                             CanonicalIV->getType(), Flags) {}
 
   ~VPWidenCanonicalIVRecipe() override = default;
 
   VPWidenCanonicalIVRecipe *clone() override {
     auto *WideCanIV =
-        new VPWidenCanonicalIVRecipe(getCanonicalIV(), getNoWrapFlags());
+        new VPWidenCanonicalIVRecipe(getCanonicalIV(), getNoWrapFlagsOrNone());
----------------
artagnon wrote:

Hm, not sure. I think the long-term plan is to allow multiple kinds of flags in VPIRFlags, for example WrapFlags with GEPNoWrapFlags -- it was discovered in https://github.com/llvm/llvm-project/pull/205908; the idea is to never have getting flags to assert. I think we currently verify if flags are valid for an opcode, so I'm not sure I see the value of asserting at the moment?

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


More information about the llvm-commits mailing list