[llvm] [SelectionDAG] Fold constant PARTIAL_REDUCE_SMLA/UMLA/SUMLA nodes (PR #210351)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 18 20:53:49 PDT 2026
================
@@ -7,10 +7,40 @@
//===----------------------------------------------------------------------===//
#include "SelectionDAGTestBase.h"
+#include "llvm/ADT/ArrayRef.h"
----------------
Chennesxu wrote:
Thanks! I've moved the cases that can be reliably expressed through IR into partial-reduction-add.ll, including accumulator-width wraparound and poison in the input and accumulator. The remaining direct SelectionDAG unit tests cover node forms that cannot be reliably produced through IR. llvm.vector.partial.reduce.add creates PARTIAL_REDUCE_UMLA with an implicit splat-of-1 multiplier, while constant extensions and multiplications are folded before the combines that would form the SMLA/SUMLA variants. Undef no-fold coverage also remains in the unit test because the undef deprecator rejects new uses in IR tests. The unit tests additionally retain coverage for promoted narrow inputs, poison in the implicit multiplier operand, and opaque or partially constant forms.
https://github.com/llvm/llvm-project/pull/210351
More information about the llvm-commits
mailing list