[llvm] [LV] Add -fold-epilogue-tail option for tail-folded epilogue (PR #190697)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sat May 2 03:17:42 PDT 2026


================
@@ -0,0 +1,87 @@
+; REQUIRES: asserts
+; RUN: opt -S < %s -p loop-vectorize -debug-only=loop-vectorize --disable-output \
+; RUN: -tail-folding-policy=prefer-fold-epilogue-tail 2>&1 | FileCheck %s
+
+; RUN: opt -S < %s -p loop-vectorize -debug-only=loop-vectorize -enable-epilogue-vectorization=false \
+; RUN: --disable-output -tail-folding-policy=prefer-fold-epilogue-tail 2>&1 \
+; RUN: | FileCheck %s --check-prefix=CHECK-DISABLED-EPILOG
+
+define void @test_epilogue_tf(ptr %A, i64 %n) {
+; CHECK: LV: Checking a loop in 'test_epilogue_tf'
----------------
fhahn wrote:

Can we use CHECK-LABEL to anchor the check lines to the function they aply to
```suggestion
; CHECK-LABEL: LV: Checking a loop in 'test_epilogue_tf'
```

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


More information about the llvm-commits mailing list