brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · a8a7430 Raw
50 lines · plain
1// RUN: mlir-translate -verify-diagnostics -split-input-file -mlir-to-llvmir %s2 3// -----4 5llvm.func @redux_sync_i32_with_abs(%value: i32, %offset: i32) {6  // expected-error@+1 {{abs attribute is supported only for f32 type}}7  %res = nvvm.redux.sync add %value, %offset {abs = true}: i32 -> i328  llvm.return9}10 11// -----12 13llvm.func @redux_sync_i32_with_nan(%value: i32, %offset: i32) {14  // expected-error@+1 {{nan attribute is supported only for f32 type}}15  %res = nvvm.redux.sync add %value, %offset {nan = true}: i32 -> i3216  llvm.return17}18 19// -----20 21llvm.func @redux_sync_f32_with_invalid_kind_add(%value: f32, %offset: i32) {22  // expected-error@+1 {{'add' redux kind unsupported with 'f32' type. Only supported type is 'i32'.}}23  %res = nvvm.redux.sync add %value, %offset: f32 -> f3224  llvm.return25}26 27// -----28 29llvm.func @redux_sync_f32_with_invalid_kind_and(%value: f32, %offset: i32) {30  // expected-error@+1 {{'and' redux kind unsupported with 'f32' type. Only supported type is 'i32'.}}31  %res = nvvm.redux.sync and %value, %offset: f32 -> f3232  llvm.return33}34 35// -----36 37llvm.func @redux_sync_i32_with_invalid_kind_fmin(%value: i32, %offset: i32) {38  // expected-error@+1 {{'fmin' redux kind unsupported with 'i32' type. Only supported type is 'f32'.}}39  %res = nvvm.redux.sync fmin %value, %offset: i32 -> i3240  llvm.return41}42 43// -----44 45llvm.func @redux_sync_non_matching_types(%value: i32, %offset: i32) {46  // expected-error@+1 {{failed to verify that all of {res, val} have same type}}47  %res = nvvm.redux.sync add %value, %offset: i32 -> f3248  llvm.return49}50