[llvm] [llvm][TableGen] Count implicit defs as well as explicit ones in the GlobalISel TableGen emitter (PR #112673)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 18 20:48:41 PDT 2024
s-barannikov wrote:
@JL2210 After this commit I get a hard error when trying to import this pattern:
```
def : Pat<(nm_ineg i32:$val), (NEGrf i32:$val)>;
```
```
NMInstrPatterns.td:259:1: error: Operand DstI[rs2] was not declared in matcher
def : Pat<(nm_ineg i32:$val), (NEGrf i32:$val)>;
```
Here, `nm_ineg` is a two-result SD node and `NEGrf` is an instruction with one explicit def and one implicit def. `rs2` is the name of the only operand.
Previously, this pattern was skipped with a warning:
```
Skipped pattern: Src pattern result has more defs than dst MI (2 def(s) vs 1 def(s))
def : Pat<(nm_ineg i32:$val), (NEGrf i32:$val)>;
```
https://github.com/llvm/llvm-project/pull/112673
More information about the llvm-commits
mailing list