Currently, conversion to libm does not play nicely with
convert-func-to-llvm='emit-c-wrappers=1'. Conversion from func to LLVM emits a
'_mlir_ciface_*' call which is not the intended behaviour here. Emit an
llvm.func instead of a func.func when converting to libm.
Example:
llvm.func @tanh_caller(%float: f32) -> (f32) {
%float_result = math.tanh %float : f32
llvm.return %float_result : f32
}Will convert to:
llvm.func @tanhf(%arg0: f32) -> f32 attributes {sym_visibility = "private"} {
%0 = llvm.call @_mlir_ciface_tanhf(%arg0) : (f32) -> f32
llvm.return %0 : f32
}
llvm.func @_mlir_ciface_tanhf(f32) -> f32 attributes {sym_visibility = "private"}
llvm.func @tanh_caller(%arg0: f32) -> f32 {
%0 = llvm.call @tanhf(%arg0) : (f32) -> f32
llvm.return %0 : f32
}This is not what you want in this situation.