[clang] [llvm] [hlsl][dxil][spirv] Add `fma` function (PR #185304)
Farzon Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 9 22:01:54 PDT 2026
================
@@ -4124,6 +4033,8 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg,
return selectAll(ResVReg, ResType, I);
case Intrinsic::spv_any:
return selectAny(ResVReg, ResType, I);
+ case Intrinsic::spv_fma:
+ return selectExtInst(ResVReg, ResType, I, CL::fma, GL::Fma);
----------------
farzonl wrote:
wait why do we need an intrinsic for this in spirv when we have `G_FMA`.
```
case TargetOpcode::G_FMA: {
...
llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp:1024: return selectExtInst(ResVReg, ResType, I, CL::fma, GL::Fma);
...
}
```
https://github.com/llvm/llvm-project/pull/185304
More information about the llvm-commits
mailing list