diff options
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | flang/lib/Frontend/CompilerInvocation.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/flang/lib/Frontend/CompilerInvocation.cpp b/flang/lib/Frontend/CompilerInvocation.cpp index e5fa38e..33ec6af 100644 --- a/flang/lib/Frontend/CompilerInvocation.cpp +++ b/flang/lib/Frontend/CompilerInvocation.cpp @@ -728,6 +728,16 @@ static bool parseFloatingPointArgs(CompilerInvocation &invoc, opts.ReciprocalMath = true; } + if (args.getLastArg(clang::driver::options::OPT_ffast_math)) { + opts.NoHonorInfs = true; + opts.NoHonorNaNs = true; + opts.AssociativeMath = true; + opts.ReciprocalMath = true; + opts.ApproxFunc = true; + opts.NoSignedZeros = true; + opts.setFPContractMode(LangOptions::FPM_Fast); + } + return true; } |