[llvm] [LV] Ignore some costs when loop gets fully unrolled (PR #106699)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 28 05:39:54 PST 2024
================
@@ -0,0 +1,115 @@
+; REQUIRES: asserts
+; RUN: opt < %s -mcpu=neoverse-v2 -passes=loop-vectorize -debug-only=loop-vectorize -disable-output 2>&1 | FileCheck %s
+
+target triple="aarch64--linux-gnu"
+
+; This test shows that comparison and next iteration IV have zero cost if the
+; vector loop gets executed exactly once with the given VF.
+define i64 @test(ptr %a, ptr %b) #0 {
+; CHECK: LV: Checking a loop in 'test'
----------------
david-arm wrote:
For the first CHECK line in every function I think it's worth changing to `CHECK-LABEL`, since this divides the CHECK lines into blocks per function. It also makes error reporting more accurate when something does go wrong.
https://github.com/llvm/llvm-project/pull/106699
More information about the llvm-commits
mailing list