[llvm] [LV] Simplify epilogue VF selection by comparing against MaxTripCount (PR #186185)
Hassnaa Hamdi via llvm-commits
llvm-commits at lists.llvm.org
Fri May 1 03:00:42 PDT 2026
================
@@ -10,7 +10,7 @@ target triple = "aarch64-unknown-linux-gnu"
define void @foo(ptr noalias nocapture readonly %p, ptr noalias nocapture %q, i64 %len) #0 {
; CHECK-EPILOG: vec.epilog.ph:
; CHECK-EPILOG: vec.epilog.vector.body:
-; CHECK-EPILOG: load <8 x i16>
+; CHECK-EPILOG: load <4 x i16>
----------------
hassnaaHamdi wrote:
Previously, when we can't calculate `MaxTripCount` -because rem iter is not fixed- we don't consider the cost of the remaining iterations when we compare between the most profitable VFs.
Now, we consider the `MaxTripCount` in all cases, that's why we chose VF of 4 whose cost is less.
https://github.com/llvm/llvm-project/pull/186185
More information about the llvm-commits
mailing list