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

Andy Kaylor via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 24 14:20:04 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()) {
----------------
andykaylor wrote:

I didn't think that had been resolved, but I agree that this change is good as-is.

It's not just fast-math that can change ftz/daz though. Users can also modify MXCSR directly. In C, FENV_ACCESS needs to be enabled, but in practice I find that users would like to be able to do that without taking on the other penalties associated with enabling fenv access (such as generally diminished optimization). It would be nice if LLVM IR had a way to allow this.

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


More information about the cfe-commits mailing list