[llvm] [LV] Update LoopVectorizationPlanner::emitInvalidCostRemarks to handle reduction plans (PR #165913)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 10 03:04:06 PST 2025
================
@@ -0,0 +1,25 @@
+; RUN: opt < %s -passes=loop-vectorize -S -pass-remarks=loop-vectorize -debug-only=loop-vectorize &> %t
+; RUN: cat %t | FileCheck --check-prefix=CHECK-REMARKS %s
+
+; CHECK-REMARKS: LV: Recipe with invalid costs prevented vectorization at VF=(vscale x 1): fadd.
+
+target triple = "aarch64-unknown-linux-gnu"
+
+define double @reduce_fail(i64 %loop_count, double %d0, ptr %ptr1) #0 {
+entry:
+ %d1 = load double, ptr %ptr1
+ br label %loop
+
+loop:
+ %acc0 = phi double [ %fadd0, %loop ], [ %d0, %entry ]
+ %counter = phi i64 [ 0, %entry ], [ %counter_updated, %loop ]
----------------
fhahn wrote:
%iv for consistency with other tests
https://github.com/llvm/llvm-project/pull/165913
More information about the llvm-commits
mailing list