brintos

brintos / llvm-project-archived public Read only

0
0
Text · 768 B · f1de97c Raw
24 lines · plain
1// RUN: mlir-opt -split-input-file -convert-math-to-emitc -verify-diagnostics %s 2 3func.func @unsupported_tensor_type(%arg0 : tensor<4xf32>) -> tensor<4xf32> {4// expected-error @+1 {{failed to legalize operation 'math.absf' that was explicitly marked illegal}}5  %0 = math.absf %arg0 : tensor<4xf32>6  return %0 : tensor<4xf32>7}8 9// -----10 11func.func @unsupported_f16_type(%arg0 : f16) -> f16 {12// expected-error @+1 {{failed to legalize operation 'math.absf' that was explicitly marked illegal}}13  %0 = math.absf %arg0 : f1614  return %0 : f1615}16 17// -----18 19func.func @unsupported_f128_type(%arg0 : f128) -> f128 {20// expected-error @+1 {{failed to legalize operation 'math.absf' that was explicitly marked illegal}}21  %0 = math.absf %arg0 : f12822  return %0 : f12823}24