[llvm] [VPlan] Make canonical IV part of the region (PR #156262)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 8 15:29:54 PDT 2025


================
@@ -165,10 +169,14 @@ class LLVM_ABI_FOR_TEST VPValue {
   const VPRecipeBase *getDefiningRecipe() const;
 
   /// Returns true if this VPValue is defined by a recipe.
-  bool hasDefiningRecipe() const { return getDefiningRecipe(); }
+  bool hasDefiningRecipe() const {
+    return SubclassID != VPRegionValueSC && getDefiningRecipe();
+  }
 
   /// Returns true if this VPValue is a live-in, i.e. defined outside the VPlan.
-  bool isLiveIn() const { return !hasDefiningRecipe(); }
+  bool isLiveIn() const {
+    return !hasDefiningRecipe() && SubclassID != VPRegionValueSC;
----------------
ayalz wrote:

```suggestion
    return (SubclassID !=  VPVRecipeSC) && (SubclassID != VPRegionValueSC);
```

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


More information about the llvm-commits mailing list