Skip to content

[libclc] Compile with -fdenormal-fp-math=dynamic#183262

Merged
wenju-he merged 1 commit intollvm:mainfrom
wenju-he:fdenormal-fp-math-dynamic
Feb 25, 2026
Merged

[libclc] Compile with -fdenormal-fp-math=dynamic#183262
wenju-he merged 1 commit intollvm:mainfrom
wenju-he:fdenormal-fp-math-dynamic

Conversation

@wenju-he
Copy link
Contributor

This PR is extracted from #157633.
-fdenormal-fp-math=dynamic is required to defer denormal handling and should be used for libclc library compilation.

Additionally, if the default ieee value is incompatible with the user code's denormal-fp-math setting, this mismatch prevents libclc functions from being inlined.

This PR is extracted from llvm#157633.
`-fdenormal-fp-math=dynamic` is required to defer denormal handling and
should be used for libclc library compilation.

Additionally, if the default ieee value is incompatible with the user
code's denormal-fp-math setting, this mismatch prevents libclc functions
from being inlined.
@wenju-he wenju-he requested a review from Copilot February 25, 2026 09:01
@llvmbot llvmbot added the libclc libclc OpenCL library label Feb 25, 2026
Copy link
Contributor

@arsenm arsenm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this was already done

@arsenm arsenm added the floating-point Floating-point math label Feb 25, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates libclc’s build configuration to compile builtins with -fdenormal-fp-math=dynamic, ensuring denormal handling is deferred and avoiding denormal-mode mismatches that can inhibit inlining between user code and libclc.

Changes:

  • Add -fdenormal-fp-math=dynamic to the default build_flags used when compiling libclc sources.

@wenju-he wenju-he merged commit 90edb20 into llvm:main Feb 25, 2026
17 checks passed
@wenju-he wenju-he deleted the fdenormal-fp-math-dynamic branch February 25, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

floating-point Floating-point math libclc libclc OpenCL library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants