[llvm] [InstCombine] Transform `vector.reduce.add` and `splat` into multiplication (PR #161020)
Hongyu Chen via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 28 04:41:20 PDT 2025
================
@@ -308,3 +308,93 @@ define i32 @diff_of_sums_type_mismatch2(<8 x i32> %v0, <4 x i32> %v1) {
%r = sub i32 %r0, %r1
ret i32 %r
}
+
----------------
XChy wrote:
Looks like other folds are done earlier, so the fold in this patch is not triggered. You can try other types like `<8 x i2>`, etc.
> But I could restrict that the type width shall be wider than the vectors width (I mean vectors elements summarized width)
Sure, that's necessary.
https://github.com/llvm/llvm-project/pull/161020
More information about the llvm-commits
mailing list