[llvm] [SPIR-V] Derive FPFastMathMode from nofpclass attributes on OpenCL builtins (PR #188984)
Arseniy Obolenskiy via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 30 06:32:11 PDT 2026
================
@@ -1279,6 +1279,28 @@ static bool generateExtInst(const SPIRV::IncomingCall *Call,
MIB.getInstr()->setFlag(MachineInstr::MIFlag::FmNoNans);
MIB.getInstr()->setFlag(MachineInstr::MIFlag::FmNoInfs);
}
+
+ // Derive fast-math flags from nofpclass attributes on the called function.
+ if (ST.isKernel() &&
+ ST.canUseExtension(SPIRV::Extension::SPV_KHR_float_controls2)) {
+ if (const Function *F = CB.getCalledFunction()) {
+ bool AddNoNan = !!(CB.getRetNoFPClass() & fcNan);
----------------
aobolensk wrote:
Removed
https://github.com/llvm/llvm-project/pull/188984
More information about the llvm-commits
mailing list