[Mlir-commits] [mlir] [mlir][spirv] Add definition for GL Log2 (PR #143409)

Jakub Kuderski llvmlistbot at llvm.org
Mon Jun 9 09:45:28 PDT 2025


================
@@ -767,6 +767,36 @@ def SPIRV_GLTanhOp : SPIRV_GLUnaryArithmeticOp<"Tanh", 21, SPIRV_Float16or32> {
 
 // -----
 
+def SPIRV_GLLog2Op : SPIRV_GLUnaryArithmeticOp<"Log2", 30, SPIRV_Float16or32> {
+  let summary = "Result is the base-2 logarithm of x";
+
+  let description = [{
+    Result is the base-2 logarithm of x, i.e., the value y which satisfies the
+    equation x = 2y. The resulting value is NaN if x < 0. Moreover:
----------------
kuhar wrote:

```suggestion
    equation x = 2**y. The resulting value is NaN if x < 0. Moreover:
```
?

https://github.com/llvm/llvm-project/pull/143409


More information about the Mlir-commits mailing list