You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This does not need to be a library build or link time constant, but can be performed with a runtime check which will specialize to a constant based on the ultimate use.
The build should compile with -Xclang -fdenormal-fp-math=dynamic, and then replace __clc_fp32_subnormals_supported with a check like:
__clc_flush_denormal_if_not_supported is also approximately equivalent to llvm.canonicalize, but implementing it as __builtin_fabsf(x) < 0x1p-149f ? copysign(0.0f, x) : x avoids the requirement to quiet a signaling nan so is slightly more foldable.