[llvm] [VPlan] Model FOR extract of exit value in VPlan. (PR #93395)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 3 06:29:34 PDT 2024


================
@@ -167,8 +167,10 @@ class VPLane {
 
   static VPLane getFirstLane() { return VPLane(0, VPLane::Kind::First); }
 
-  static VPLane getLastLaneForVF(const ElementCount &VF) {
-    unsigned LaneOffset = VF.getKnownMinValue() - 1;
+  static VPLane getLaneFromEnd(const ElementCount &VF, unsigned Offset) {
+    assert(Offset <= VF.getKnownMinValue() &&
----------------
ayalz wrote:

```suggestion
    assert(Offset > 0 && Offset <= VF.getKnownMinValue() &&
```

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


More information about the llvm-commits mailing list