[llvm-branch-commits] [libclc] release/22.x: [libclc] mark __clc_flush_denormal_if_not_supported as static inline (PR #207264)
Karol Herbst via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Jul 12 07:23:31 PDT 2026
karolherbst wrote:
> > But I also wasn't aware how short lived releases branches are as I just realized that normally no more releases are planned, is that right?
>
> I'm not familiar with llvm release cadence. 22.x branch is probably not frozen yet because 23 is not released yet. So critical bug fix should be ok to land in 22.x branch.
Yeah, not sure if this is critical enough to make yet another release, but not my call to make. But I've seen other PRs against 22.x that were closed already, because of "we don't do another 22.x release".
But it does break certain builtins like `cos`, because there is no definition for `__clc_flush_denormal_if_not_supported` in the final SPIR-V.
It also feels like the bug is actually something else, because it also looks like a codegen or tooling issue, though this PR is rather trivial and does fix the issue.
Like in the SPIR-V (without this PR) I'm seeing this:
```
%_Z37__clc_flush_denormal_if_not_supportedf = OpFunction %float None %4639
%4641 = OpFunctionParameter %float
OpFunctionEnd
```
And then multiple calls to it across the entire libclc:
```
%113249 = OpFunctionCall %float %_Z37__clc_flush_denormal_if_not_supportedf %113248
%113251 = OpFunctionCall %float %_Z37__clc_flush_denormal_if_not_supportedf %113250
%113253 = OpFunctionCall %float %_Z37__clc_flush_denormal_if_not_supportedf %113252
%198384 = OpFunctionCall %float %_Z37__clc_flush_denormal_if_not_supportedf %198383
%198386 = OpFunctionCall %float %_Z37__clc_flush_denormal_if_not_supportedf %198385
%199563 = OpFunctionCall %float %_Z37__clc_flush_denormal_if_not_supportedf %199562
%199565 = OpFunctionCall %float %_Z37__clc_flush_denormal_if_not_supportedf %199564
%200742 = OpFunctionCall %float %_Z37__clc_flush_denormal_if_not_supportedf %200741
%200744 = OpFunctionCall %float %_Z37__clc_flush_denormal_if_not_supportedf %200743
%201921 = OpFunctionCall %float %_Z37__clc_flush_denormal_if_not_supportedf %201920
%201923 = OpFunctionCall %float %_Z37__clc_flush_denormal_if_not_supportedf %201922
```
And I'd have expected that this would already break at linking time or something.
Or I guess those are just normal C rules, because no compilation unit actually instantiated the definition of `__clc_flush_denormal_if_not_supported`. But then again, I think it would be better if at build time it would already made sure that all symbols are resolved so we won't run into this issue in the future?
https://github.com/llvm/llvm-project/pull/207264
More information about the llvm-branch-commits
mailing list