[llvm] [SelectionDAG] Fold VECREDUCE_ADD of a constant BUILD_VECTOR (PR #207560)

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 5 01:11:13 PDT 2026


================
@@ -0,0 +1,53 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=riscv64 -mattr=+v -verify-machineinstrs < %s | FileCheck %s
+
+; Case 1: all-constant vector -> should fold to a plain constant (10)
----------------
RKSimon wrote:

split this PR commit into 2 commits - the first adding these new tests with the current codegen, then the second commit with the codegen changes. 

Still a single PR (which will be squashed when pushed to trunk)

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


More information about the llvm-commits mailing list