[Mlir-commits] [mlir] [MLIR][NVVM] Update redux.sync op (PR #166125)
Durgadoss R
llvmlistbot at llvm.org
Mon Nov 3 04:44:39 PST 2025
================
@@ -0,0 +1,49 @@
+// RUN: mlir-translate -verify-diagnostics -split-input-file -mlir-to-llvmir %s
+
+// -----
+
+llvm.func @redux_sync_i32_with_abs(%value: i32, %offset: i32) {
+ // expected-error at +1 {{abs attribute is supported only for f32 type}}
+ %res = nvvm.redux.sync add %value, %offset {abs = true}: i32 -> i32
+ llvm.return
+}
+
+// -----
+
+llvm.func @redux_sync_i32_with_nan(%value: i32, %offset: i32) {
+ // expected-error at +1 {{nan attribute is supported only for f32 type}}
+ %res = nvvm.redux.sync add %value, %offset {nan = true}: i32 -> i32
+ llvm.return
+}
+
+// -----
+
+llvm.func @redux_sync_f32_with_invalid_kind(%value: f32, %offset: i32) {
----------------
durga4github wrote:
nit: Can we suffix the func-name with `_add` here and `_and` below?
(Though we reply on split-file option..)
https://github.com/llvm/llvm-project/pull/166125
More information about the Mlir-commits
mailing list