[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

James Y Knight via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 24 12:33:18 PDT 2024


================
@@ -842,25 +842,6 @@ void Linux::addProfileRTLibs(const llvm::opt::ArgList &Args,
   ToolChain::addProfileRTLibs(Args, CmdArgs);
 }
 
-llvm::DenormalMode
-Linux::getDefaultDenormalModeForType(const llvm::opt::ArgList &DriverArgs,
-                                     const JobAction &JA,
-                                     const llvm::fltSemantics *FPType) const {
-  switch (getTriple().getArch()) {
----------------
jyknight wrote:

No, we shouldn't. This was discussed before: https://github.com/llvm/llvm-project/pull/80475#issuecomment-1928170074 and surrounding comments.
But in short: doing so would regress normal code, only for the (arguable) benefit of code which is explicitly asks to play fast-and-loose with the rules via `-ffast-math`.

I think the change is good as-is.

https://github.com/llvm/llvm-project/pull/80475


More information about the cfe-commits mailing list