[Mlir-commits] [mlir] [mlir][ODS] Add `OptionalTypesMatchWith` and remove a custom assemblyFormat (PR #68876)
Cullen Rhodes
llvmlistbot at llvm.org
Thu Oct 12 05:06:01 PDT 2023
================
@@ -263,9 +265,8 @@ def Vector_ReductionOp :
"::mlir::arith::FastMathFlags::none">:$fastMathFlags)>
];
- // TODO: Migrate to assemblyFormat once `AllTypesMatch` supports optional
- // operands.
- let hasCustomAssemblyFormat = 1;
+ let assemblyFormat = "$kind `,` $vector (`,` $acc^)? (`fastmath` $fastmath^)?"
----------------
c-rhodes wrote:
the current format of `fastmath<flag>` (vs `fastmath <flag>`) can be preserved with the suggestion. This is also consistent with other ops that use fastmath flags so I think it's worth preserving.
```suggestion
let assemblyFormat = "$kind `,` $vector (`,` $acc^)? (`fastmath` `` $fastmath^)?"
```
https://github.com/llvm/llvm-project/pull/68876
More information about the Mlir-commits
mailing list