diff --git a/src/CodeGen_Internal.cpp b/src/CodeGen_Internal.cpp index 0ac2e45d026c..42025541f0fe 100644 --- a/src/CodeGen_Internal.cpp +++ b/src/CodeGen_Internal.cpp @@ -614,8 +614,8 @@ void get_target_options(const llvm::Module &module, llvm::TargetOptions &options options.AllowFPOpFusion = per_instruction_fast_math_flags ? llvm::FPOpFusion::Strict : llvm::FPOpFusion::Fast; #if LLVM_VERSION < 230 options.NoInfsFPMath = !per_instruction_fast_math_flags; -#endif options.NoNaNsFPMath = !per_instruction_fast_math_flags; +#endif options.HonorSignDependentRoundingFPMathOption = !per_instruction_fast_math_flags; options.NoZerosInBSS = false; options.GuaranteedTailCallOpt = false; diff --git a/src/CodeGen_PTX_Dev.cpp b/src/CodeGen_PTX_Dev.cpp index 3deab616ecc5..77783fd528aa 100644 --- a/src/CodeGen_PTX_Dev.cpp +++ b/src/CodeGen_PTX_Dev.cpp @@ -630,8 +630,8 @@ vector CodeGen_PTX_Dev::compile_to_src() { options.AllowFPOpFusion = CodeGen_GPU_Dev::any_strict_float ? llvm::FPOpFusion::Strict : llvm::FPOpFusion::Fast; #if LLVM_VERSION < 230 options.NoInfsFPMath = !CodeGen_GPU_Dev::any_strict_float; -#endif options.NoNaNsFPMath = !CodeGen_GPU_Dev::any_strict_float; +#endif options.HonorSignDependentRoundingFPMathOption = !CodeGen_GPU_Dev::any_strict_float; options.NoZerosInBSS = false; options.GuaranteedTailCallOpt = false;