Skip to content

Commit 0bc833a

Browse files
Remove usage of NoNansFPMath after LLVM 22 (#9039)
This was removed upstream and was a no-op when it got removed, so we can simply hide these options behind an if-def.
1 parent 6235b4b commit 0bc833a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/CodeGen_Internal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,8 +614,8 @@ void get_target_options(const llvm::Module &module, llvm::TargetOptions &options
614614
options.AllowFPOpFusion = per_instruction_fast_math_flags ? llvm::FPOpFusion::Strict : llvm::FPOpFusion::Fast;
615615
#if LLVM_VERSION < 230
616616
options.NoInfsFPMath = !per_instruction_fast_math_flags;
617-
#endif
618617
options.NoNaNsFPMath = !per_instruction_fast_math_flags;
618+
#endif
619619
options.HonorSignDependentRoundingFPMathOption = !per_instruction_fast_math_flags;
620620
options.NoZerosInBSS = false;
621621
options.GuaranteedTailCallOpt = false;

src/CodeGen_PTX_Dev.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,8 @@ vector<char> CodeGen_PTX_Dev::compile_to_src() {
630630
options.AllowFPOpFusion = CodeGen_GPU_Dev::any_strict_float ? llvm::FPOpFusion::Strict : llvm::FPOpFusion::Fast;
631631
#if LLVM_VERSION < 230
632632
options.NoInfsFPMath = !CodeGen_GPU_Dev::any_strict_float;
633-
#endif
634633
options.NoNaNsFPMath = !CodeGen_GPU_Dev::any_strict_float;
634+
#endif
635635
options.HonorSignDependentRoundingFPMathOption = !CodeGen_GPU_Dev::any_strict_float;
636636
options.NoZerosInBSS = false;
637637
options.GuaranteedTailCallOpt = false;

0 commit comments

Comments
 (0)