[PATCH] D137811: InstCombine: Perform basic isnan combines on llvm.is.fpclass

Joshua Cranmer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 09:16:01 PST 2023


jcranmer-intel added a comment.

In D137811#4085810 <https://reviews.llvm.org/D137811#4085810>, @arsenm wrote:

> For the purpose of this change, the exact definition of FENV_ACCESS doesn't matter. This is not something that the context of a single instruction can or should consider. This would have to be managed by implicit mode switches inserted by the frontend to maintain the invariant that non-strict functions don't have to be concerned about it. Our strictfp representation would be totally broken if we had to think about this in a non-strict function

The underlying question is if it's legal for a compiler to insert a call to a flags-setting instruction in `FENV_ACCESS OFF` along code paths that never had them (with the answer almost certainly "yes"). We have these semantics for non-`strictfp` in LLVM.


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

https://reviews.llvm.org/D137811



More information about the llvm-commits mailing list