[llvm] [SPIR-V] Add lowering for G_FEXP10 (PR #182466)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 20 07:51:31 PST 2026
================
@@ -3218,6 +3284,46 @@ bool SPIRVInstructionSelector::selectFCmp(Register ResVReg,
return selectCmp(ResVReg, ResType, CmpOp, I);
}
+bool SPIRVInstructionSelector::selectExp10(Register ResVReg,
+ SPIRVTypeInst ResType,
+ MachineInstr &I) const {
+
+ if (STI.canUseExtInstSet(SPIRV::InstructionSet::OpenCL_std)) {
+ return selectExtInst(ResVReg, ResType, I, CL::exp10);
+ } else if (STI.canUseExtInstSet(SPIRV::InstructionSet::GLSL_std_450)) {
----------------
idubinov wrote:
else was removed, "if (canUseInstrSet)" left as is - no need in early exit, it is lineal if,if,if,... statements. By now there are only two "if"s : ocl and gl
https://github.com/llvm/llvm-project/pull/182466
More information about the llvm-commits
mailing list