Skip to content

Commit ed43bae

Browse files
committed
update tests
1 parent dc2092d commit ed43bae

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

mlir/test/Target/LLVMIR/nvvm/redux-sync-invalid.mlir

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,39 @@
33
// -----
44

55
llvm.func @redux_sync_i32_with_abs(%value: i32, %offset: i32) {
6-
// expected-error@+1 {{'nvvm.redux.sync' op abs attribute is supported only for f32 type}}
6+
// expected-error@+1 {{abs attribute is supported only for f32 type}}
77
%res = nvvm.redux.sync add %value, %offset {abs = true}: i32 -> i32
88
llvm.return
99
}
1010

1111
// -----
1212

1313
llvm.func @redux_sync_i32_with_nan(%value: i32, %offset: i32) {
14-
// expected-error@+1 {{'nvvm.redux.sync' op nan attribute is supported only for f32 type}}
14+
// expected-error@+1 {{nan attribute is supported only for f32 type}}
1515
%res = nvvm.redux.sync add %value, %offset {nan = true}: i32 -> i32
1616
llvm.return
1717
}
1818

1919
// -----
2020

2121
llvm.func @redux_sync_f32_with_invalid_kind(%value: f32, %offset: i32) {
22-
// expected-error@+1 {{'nvvm.redux.sync' op only fmin and fmax redux kinds are supported for f32 type}}
22+
// expected-error@+1 {{only fmin and fmax redux kinds are supported for f32 type}}
2323
%res = nvvm.redux.sync add %value, %offset: f32 -> f32
2424
llvm.return
2525
}
2626

2727
// -----
2828

2929
llvm.func @redux_sync_i32_with_invalid_kind(%value: i32, %offset: i32) {
30-
// expected-error@+1 {{'nvvm.redux.sync' op fmin and fmax redux kind must be used with f32 type}}
30+
// expected-error@+1 {{fmin and fmax redux kind must be used with f32 type}}
3131
%res = nvvm.redux.sync fmin %value, %offset: i32 -> i32
3232
llvm.return
3333
}
34+
35+
// -----
36+
37+
llvm.func @redux_sync_non_matching_types(%value: i32, %offset: i32) {
38+
// expected-error@+1 {{failed to verify that all of {res, val} have same type}}
39+
%res = nvvm.redux.sync add %value, %offset: i32 -> f32
40+
llvm.return
41+
}

0 commit comments

Comments
 (0)