llvm-project
6eb5ac52 - [SystemZ] Remove custom lowering of f16 IS_FPCLASS (#187532)

Commit
28 days ago
[SystemZ] Remove custom lowering of f16 IS_FPCLASS (#187532) As pointed out in #187518 , currently, `__builtin_isnormal` returns `true` for subnormal half precision floating point numbers on `s390x. This is because there is a custom lowering defined which lowers an `f16` `IS_FPCLASS` ISD node by extending the `f16` value to `f32`, and then using SystemZ's "test data class" instruction to determine whether the number is subnormal. However, a number that is subnormal in 16 bits of precision will no longer be subnormal in 32 bits of precision, and so the test always returns true, i.e. all subnormal numbers are classified as normal. This PR addresses this by removing the custom lowering and instead relying on the generic expansion of `IS_FPCLASS`, which does not have this error. Fixes #187518 .
Parents
Loading