[Mlir-commits] [mlir] [mlir][emitc] Mark emitc.literal with CExpression (PR #155582)

Simon Camphausen llvmlistbot at llvm.org
Wed Aug 27 04:29:10 PDT 2025


================
@@ -851,7 +851,7 @@ def EmitC_IncludeOp
   let hasCustomAssemblyFormat = 1;
 }
 
-def EmitC_LiteralOp : EmitC_Op<"literal", [Pure]> {
+def EmitC_LiteralOp : EmitC_Op<"literal", [Pure, CExpressionInterface]> {
----------------
simon-camp wrote:

I think we need to overwrite hasSideEffects to return false because literals are always inlined on their own. See also my comment about a test for that.

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


More information about the Mlir-commits mailing list