[Mlir-commits] [mlir] [mlir][emitc] Refactor ArithToEmitC: perform sign adaptation, type conversions / cast insertion in a single place (PR #95789)

Simon Camphausen llvmlistbot at llvm.org
Tue Jun 18 07:24:49 PDT 2024


================
@@ -288,6 +288,7 @@ def EmitC_CastOp : EmitC_Op<"cast",
   let arguments = (ins EmitCType:$source);
   let results = (outs EmitCType:$dest);
   let assemblyFormat = "$source attr-dict `:` type($source) `to` type($dest)";
+  let hasFolder = 1;
----------------
simon-camp wrote:

Why is this needed? I would have thought folding is done through the CastOpInterface, but I haven't checked.

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


More information about the Mlir-commits mailing list