[Mlir-commits] [mlir] [mlir][spirv] Add definition for GL Fract (PR #132921)

Igor Wodiany llvmlistbot at llvm.org
Tue Mar 25 07:57:05 PDT 2025


================
@@ -1161,4 +1161,29 @@ def SPIRV_GLFindUMsbOp : SPIRV_GLUnaryArithmeticOp<"FindUMsb", 75, SPIRV_Int32>
   }];
 }
 
+// ----
+
+def SPIRV_GLFractOp : SPIRV_GLUnaryArithmeticOp<"Fract", 10, SPIRV_Float> {
----------------
IgWod-IMG wrote:

Seems like `SPIRV_GLUnaryArithmeticOp` derives from `SPIRV_GLUnaryOp` that already includes `Pure`:

```
// Base class for GL unary ops.
class SPIRV_GLUnaryOp<string mnemonic, int opcode, Type resultType,
                      Type operandType, list<Trait> traits = []> :
  SPIRV_GLOp<mnemonic, opcode, !listconcat([Pure], traits)> {
```

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


More information about the Mlir-commits mailing list