[llvm] [LV] Ignore some costs when loop gets fully unrolled (PR #106699)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 13:10:19 PST 2024
================
@@ -0,0 +1,38 @@
+; REQUIRES: asserts
+; RUN: opt < %s -mcpu=neoverse-v2 -passes=loop-vectorize -debug-only=loop-vectorize -disable-output -S 2>&1 | FileCheck %s
+
+target triple="aarch64--linux-gnu"
+
+define i64 @test(ptr %a, ptr %b) #0 {
+; CHECK: LV: Checking a loop in 'test'
+; CHECK: LV: Found an estimated cost of 1 for VF 8 For instruction: %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
+; CHECK: LV: Found an estimated cost of 1 for VF 8 For instruction: %exitcond.not = icmp eq i64 %indvars.iv.next, 16
----------------
fhahn wrote:
Better to check the output of the VPlan-based cost model instead of the legacy one.
https://github.com/llvm/llvm-project/pull/106699
More information about the llvm-commits
mailing list