[llvm] [TableGen][SelectionDAG] Remove the `implicit` DAG node (PR #115295)

Sergei Barannikov via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 08:40:07 PST 2024


s-barannikov wrote:

> `[(set AL, EFLAGS, (node AL, GR8:$src1))]` looks to me like it would be for matching a node with 2 outputs, but I guess that's not what was implemented

(`node` should've been `mul` here, I've fixed the description)

This is subtle. The `mul` (which has one output) will be selected to `MULr8`, which has no explicit defs. After selection, `MULr8` will have two results in the DAG, with the second result unused. This unused result has no effect on the code generated from the DAG by InstrEmitter. The pattern should look like `[(set AL, (mul AL, GR8:$src1))]`; I didn't change it so that this patch is more NFC from the point of view of generated tables.


https://github.com/llvm/llvm-project/pull/115295


More information about the llvm-commits mailing list