This tablegen file (find AMD64Ops.td here, find the generated definition for MOV64ri below the console output):
include "mlir/IR/PatternBase.td"
include "mlir/Dialect/Arith/IR/ArithOps.td"
include "AMD64/AMD64Ops.td"
def MovExamplePat : Pat<(Arith_ConstantOp I64Attr:$attr), (MOV64ri $attr)>;
I suspect that the whole pattern, just using $attr as the argument is wrong, but since it's an assertion failure instead of a proper error message, and said assertion failure requests a bug report, here I am ^^. I would also welcome any suggestions, if anything I'm doing here is a terrible idea :).
(Commit: 583d492c6)
This tablegen file (find AMD64Ops.td here, find the generated definition for MOV64ri below the console output):
leads to this assertion failure:
MOV64ri as promised:
The corresponding builder (
anonymouse_474
):The definition of the instruction info struct property can be found here in tablegen and here in C++.
I suspect that the whole pattern, just using
$attr
as the argument is wrong, but since it's an assertion failure instead of a proper error message, and said assertion failure requests a bug report, here I am ^^. I would also welcome any suggestions, if anything I'm doing here is a terrible idea :).