[PATCH] D142907: LangRef: Add "dynamic" option to "denormal-fp-math"

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 16 10:34:25 PST 2023


arsenm added a comment.

In D142907#4132543 <https://reviews.llvm.org/D142907#4132543>, @kpn wrote:

> What's the plan for tying this to strictfp? Because I don't it should be tied to cases where we use the constrained intrinsics but the exceptions are ignored and the default rounding is in stated. Those instructions are supposed to behave the same as the non-constrained instructions. So keying off the presence of the strictfp attribute on the function definition, or the (equivalent) presence of constrained intrinsics, would be too simple.

The denormal mode is exactly parallel to the rounding mode, we just don't have a mirrored field in the constrained intrinsic metadata operands. If we defaulted to using the dynamic mode if you were to use strictfp, everything would be OK. You just couldn't optimize based on knowledge of the denormal mode. I don't really think it's worth putting in the same optimization effort as the rounding mode.


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

https://reviews.llvm.org/D142907



More information about the llvm-commits mailing list