[PATCH] D80315: Fix CC1 command line options mapping into fast-math flags.

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 29 12:33:52 PDT 2020


rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.

>> I'm actually surprised it doesn't.  I can't imagine why someone enabling fast math would want contraction to be disabled.
> 
> Just to be clear the clang driver does the right thing.
>  If you run `clang -ffast-math` the CC1 invocation has both `-ffast-math` and `-ffp-contract=fast` (and other options as well)
> 
> Here specifically I'm just considering the behavior of `clang -cc1 -ffast-math`.

Okay.  It is probably best for testing purposes if flags like this stay as close as possible to their driver behavior.  The driver can just canonicalize different spellings down to the interface that -cc1 wants.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80315





More information about the cfe-commits mailing list