[PATCH] D62731: Add support for options -frounding-math, -ftrapping-math, -ffp-model=, and -ffp-exception-behavior=, : Specify floating point behavior

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 12 17:48:08 PST 2019


rjmccall added a comment.

In D62731#1782897 <https://reviews.llvm.org/D62731#1782897>, @andrew.w.kaylor wrote:

> In D62731#1782762 <https://reviews.llvm.org/D62731#1782762>, @rjmccall wrote:
>
> > Currently we emit a warning if you use `-frounding-math`, saying that the option is ignored.  That should have alerted users that they're not getting the correct behavior now.  This patch removes the warning and (IIUC) implements the correct behavior but is over-conservative.  If that's correct, I think that's acceptable and we don't need an "experimental" flag or a warning.
>
>
> Oh, I didn't realize we were already warning about that. In theory, we should handle rounding math correctly with this change. It's possible we've missed some things, but I suppose that's always true. I think there are a few general intrinsics left that need constrained versions but don't have them, and we don't have any solution yet for target-specific intrinsics. If any of those have special handling that assumes the default rounding mode we will get it wrong. I don't think most users would be likely to encounter a problem.


Hmm.  The target-specific intrinsics thing does concern me, since I assume many targets have a bunch of vector intrinsics that may be sensitive to rounding.  Do we have an idea of how we'd fix that?  If it's a short-term incorrectness that we have a plan to fix, I don't mind the risk, but if we don't know how we'd even start to address it...


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62731





More information about the cfe-commits mailing list