[llvm] [IR][LangRef] Add partial reduction add intrinsic (PR #94499)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 04:13:21 PDT 2024


================
@@ -19209,6 +19209,35 @@ will be on any later loop iteration.
 This intrinsic will only return 0 if the input count is also 0. A non-zero input
 count will produce a non-zero result.
 
+'``llvm.experimental.vector.partial.reduce.add.*``' Intrinsic
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Syntax:
+"""""""
+This is an overloaded intrinsic.
+
+::
+
+      declare <4 x i32> @llvm.experimental.vector.partial.reduce.add.v2i32.v8i32(<8 x i32> %in)
+      declare <4 x i32> @llvm.experimental.vector.partial.reduce.add.v4i32.v16i32(<16 x i32> %in)
----------------
paulwalker-arm wrote:

To be specific I'm proposing
```
declare <4 x i32> @llvm.experimental.vector.partial.reduce.add.v4i32.v16i32(<4 x i32>,<16 x i32>)
```
whereby the result and first operand types match, but the second operand differs (perhaps with a restriction that is must have the same or more elements).

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


More information about the llvm-commits mailing list