Files
clang-p2996/mlir/lib/TableGen
Philipp Schilk 7aebacbee9 [MLIR][TableGen] Use arg index in InferredResultType constructor. (#122717)
Trying to constrain two results to be of the same type using
`AllTypesMatch` would cause `mlir-tablgen` to crash on this
assertion[1].

Example:

```tblgen
def OpL5 : NS_Op<"op_with_same_but_unconstraint_results",
    [AllTypesMatch<["result_a", "result_b"]>]> {
  let results = (outs AnyType:$result_a, AnyType:$result_b);
}
```

This is because there was a small bug when constructing the `inferences`
graph from these constraints: The sources should be specified by the
combined arg/result index (in other words, with results negative) not
with the result index.


[1]
99612a3a18/mlir/lib/TableGen/Operator.cpp (L526)
2025-01-13 18:05:26 +02:00
..