[llvm] [LV] Add tests for excluded cases in epiloge tail-folding (PR #217364)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 05:57:27 PDT 2026


================
@@ -74,25 +76,115 @@ exit.2:
   ret i16 1
 }
 
-define i32 @opt_for_size(ptr %p, i32 %n) optsize {
-; CHECK-LABEL: LV: Checking a loop in 'opt_for_size'
-; CHECK: LV: No epilogue to apply tail-folding for.
-; CHECK-NEXT: LV: Fall back to a normal epilogue
+define i32 @opt_for_size(ptr %p, i32 %n, i8 %val) optsize {
+; CHECK-LABEL: Checking a loop in 'opt_for_size'
+; CHECK: remark: <unknown>:0:0: No epilogue to apply tail-folding for. Fall back to a normal epilogue
----------------
david-arm wrote:

This message seems a bit confusing, because we also cannot fail back to a normal epilogue. With optsize I assume we want to tail-fold the main loop so there just won't be an epilogue? I wonder if it's worth saying something like:

```
Not applying tail-folding to the epilogue, since tail-folding is already requested for the main vector loop.
```

?

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


More information about the llvm-commits mailing list