[Mlir-commits] [mlir] [mlir][spirv] Remove ConstantLike trait from spirv.ARM.GraphConstant (PR #198054)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Fri May 15 18:50:20 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir
Author: Longsheng Mou (CoTinker)
<details>
<summary>Changes</summary>
Operations with the `ConstantLike` trait can always be folded into a concrete attribute value. However, the `spirv.ARM.GraphConstant` op cannot be folded, because its GraphConstantID is merely a unique identifier used to map to the actual constants defined in the SPIR-V module. Therefore, the `ConstantLike` trait should be removed from `pirv.ARM.GraphConstant`. Fixes #<!-- -->197970.
---
Full diff: https://github.com/llvm/llvm-project/pull/198054.diff
1 Files Affected:
- (modified) mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGraphOps.td (+1-1)
``````````diff
diff --git a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGraphOps.td b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGraphOps.td
index d8012749131d6..b68a635253975 100644
--- a/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGraphOps.td
+++ b/mlir/include/mlir/Dialect/SPIRV/IR/SPIRVGraphOps.td
@@ -116,7 +116,7 @@ def InGraphScope : PredOpTrait<
// -----
-def SPIRV_GraphConstantARMOp : SPIRV_GraphARMOp<"GraphConstant", [InGraphScope, Pure, ConstantLike]> {
+def SPIRV_GraphConstantARMOp : SPIRV_GraphARMOp<"GraphConstant", [InGraphScope, Pure]> {
let summary = "Declare a graph constant.";
let description = [{
``````````
</details>
https://github.com/llvm/llvm-project/pull/198054
More information about the Mlir-commits
mailing list