[PATCH] D104854: Introduce intrinsic llvm.isnan

Roman Lebedev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 20 08:44:25 PDT 2021


lebedev.ri added a comment.

In D104854#2957471 <https://reviews.llvm.org/D104854#2957471>, @sepavloff wrote:

> In D104854#2957423 <https://reviews.llvm.org/D104854#2957423>, @spatel wrote:
>
>> Is it intentional that we are not canonicalizing the intrinsic call back to `fcmp uno` in the default FP environment?
>
> It is lowered to unordered comparison by default. Changing `llvm.isnan` to  `fcmp uno` somewhere in IR would make it possible to optimize out the latter if fast-math mode is on. Preserving semantics of `isnan` when fast-math is in effect was one of the goals of this change.

Eeek. Was there an RFC about this?
This does not sound good to me at all,
much like "let's not apply fast-math flags to x86 vector intrinsics".


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104854/new/

https://reviews.llvm.org/D104854



More information about the cfe-commits mailing list