[PATCH] D137618: [Clang] Fix behavior of -ffp-model option when overriden

Qiu Chaofan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 16 18:45:33 PST 2022


qiucf added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:3034
       RoundingFPMath = false;
+      FPExceptionBehavior = "";
       // If fast-math is set then set the fp-contract mode to fast.
----------------
zahiraam wrote:
>  FPExceptionBehavior should be set here and in case options::OPT_ffp_model_EQ:
Here's the case when `FPExceptionBehavior` was set and `-ffp-model=fast` or `-Ofast` or -ffast-math` takes effect. Exception behavior needs to be reset.

`OptID` was changed so `OPT_ffp_model_EQ` will not be matched in the switch-case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137618



More information about the cfe-commits mailing list