[llvm] [LV] Handle partial sub-reductions with sub in middle block. (PR #178919)

Graham Hunter via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 5 03:22:16 PST 2026


================
@@ -0,0 +1,76 @@
+; REQUIRES: asserts
+; RUN: opt -passes=loop-vectorize                                          \
+; RUN:     -enable-epilogue-vectorization=false -debug-only=loop-vectorize \
+; RUN:     -disable-output < %s 2>&1 | FileCheck %s
+
+; CHECK: LV: Checking a loop in 'sub_reduction'
+; CHECK: Cost of 1 for VF 16: EXPRESSION vp<{{.*}}> = ir<%acc> + partial.reduce.add (mul (ir<%load1> sext to i32), (ir<%load2> sext to i32))
+
+; CHECK: LV: Checking a loop in 'add_sub_chained_reduction'
----------------
huntergr-arm wrote:

Would be nice to move the `CHECK` lines next to the matching function, and maybe use `CHECK-LABEL` for the first line of each group.

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


More information about the llvm-commits mailing list