[llvm] [LV] Allow runtime checks for low trip count loops without scalar epilogues (PR #197391)

Mel Chen via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 12 01:28:51 PDT 2026


================
@@ -0,0 +1,87 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals none --version 6
+; RUN: opt -S < %s -passes=loop-vectorize -mtriple=aarch64-unknown-linux-gnu | FileCheck %s
+
+define void @low_trip_count_12_needs_runtime_check(ptr %dst, ptr %a, ptr %b, i32 %m) {
----------------
Mel-Chen wrote:

Thanks for providing the test case and pointing out the issue. 
For now, I've applied a quick fix. e3a537b001c07cacc7b964683d0d58ff215380f1 
That said, I believe it would be better to separate the three decisions: allowing an epilogue, requiring tail folding, and optimizing for size.

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


More information about the llvm-commits mailing list