The floating-point lowering of Fortran intrinsics like abs uses the llvm intrinsics. Currently, we only have the f32 and f64 floating types handled. If a quad precision or a half-precision then this will result in being converted to a 32 bit type and then the llvm.fabs.f32 llvm intrinsic is used to handle the conversion. For a precision higher than 64 this will cause an assert in a build with assert but will proceed with conversions in a release build. The documentation for llvm.fabs mentions several types that can be used with the fabs intrinsic but also cautions that all targets might not support these.
I am in the process of upstreaming this code, and I have the following questions,
- Is this a first-cut implementation handling the most commonly used types (32, 64)?
- Or was a conclusion reached that the 32 and 64 bit types are the only ones that are handled by all targets?
The floating-point lowering of Fortran intrinsics like
absuses the llvm intrinsics. Currently, we only have the f32 and f64 floating types handled. If a quad precision or a half-precision then this will result in being converted to a 32 bit type and then thellvm.fabs.f32llvm intrinsic is used to handle the conversion. For a precision higher than 64 this will cause an assert in a build with assert but will proceed with conversions in a release build. The documentation forllvm.fabsmentions several types that can be used with the fabs intrinsic but also cautions that all targets might not support these.I am in the process of upstreaming this code, and I have the following questions,