[all-commits] [llvm/llvm-project] 0a2aaa: [SPIRV] Implement log10 for logical SPIR-V (#66921)
Natalie Chouinard via All-commits
all-commits at lists.llvm.org
Fri Oct 6 06:38:14 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 0a2aaab5aba463b221a244f0f2722655d8d19d62
https://github.com/llvm/llvm-project/commit/0a2aaab5aba463b221a244f0f2722655d8d19d62
Author: Natalie Chouinard <1953083+sudonatalie at users.noreply.github.com>
Date: 2023-10-06 (Fri, 06 Oct 2023)
Changed paths:
M llvm/lib/Target/SPIRV/SPIRVGlobalRegistry.cpp
M llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp
M llvm/lib/Target/SPIRV/SPIRVLegalizerInfo.cpp
A llvm/test/CodeGen/SPIRV/hlsl-intrinsics/log10.ll
Log Message:
-----------
[SPIRV] Implement log10 for logical SPIR-V (#66921)
There is no log10 instruction in the GLSL Extended Instruction Set so to
implement the HLSL log10 intrinsic when targeting Vulkan this change
adds the logic to derive the result using the following formula:
```
log10(x) = log2(x) * (1 / log2(10))
= log2(x) * 0.30103
```
More information about the All-commits
mailing list