diff options
author | Philipp Schilk <schilk.philipp@gmail.com> | 2025-01-13 17:05:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-13 18:05:26 +0200 |
commit | 7aebacbee965a83c5cc69f6a723605436651672c (patch) | |
tree | 85ecc47c5b7cf3993bd2600705afa8be935f7e18 /llvm/lib/Analysis/ValueTracking.cpp | |
parent | 7059178bd38e770bfadebeadf0811d0d7cb9a9e2 (diff) | |
download | llvm-7aebacbee965a83c5cc69f6a723605436651672c.zip llvm-7aebacbee965a83c5cc69f6a723605436651672c.tar.gz llvm-7aebacbee965a83c5cc69f6a723605436651672c.tar.bz2 |
[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]
https://github.com/llvm/llvm-project/blob/99612a3a18e0c40aac9c52b68e67b106f97ed4fa/mlir/lib/TableGen/Operator.cpp#L526
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
0 files changed, 0 insertions, 0 deletions