[Mlir-commits] [mlir] [mlir][emitc] Fix `emitc.expression` example (PR #84060)

Marius Brehler llvmlistbot at llvm.org
Wed Mar 6 00:30:29 PST 2024


================
@@ -409,9 +409,9 @@ def EmitC_ExpressionOp : EmitC_Op<"expression",
     int32_t v7 = foo(v1 + v2) * (v3 + v4);
     ```
 
-    The operations allowed within expression body are emitc.add, emitc.apply,
-    emitc.call, emitc.cast, emitc.cmp, emitc.div, emitc.mul, emitc.rem and
-    emitc.sub.
+    The operations allowed within expression body are `emitc.add`,
+    `emitc.apply`, `emitc.call`, `emitc.cast`, `emitc.cmp`, `emitc.div`,
----------------
marbre wrote:

Not without further changes, see

https://github.com/llvm/llvm-project/blob/7a0acccd81df268dc7ad4c0358c42552789f19b4/mlir/include/mlir/Dialect/EmitC/IR/EmitC.td#L430-L434

which is used in `ExpressionOp::verify()`. But if we change this, this should be done in a follow up.



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


More information about the Mlir-commits mailing list