TableGen/GlobalISel: Allow output instructions with multiple defs
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 13 Jul 2020 12:59:38 +0000 (08:59 -0400)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 27 Jul 2020 22:31:13 +0000 (18:31 -0400)
commitee3feef5aaaa3c385fbe08bdb2d48829ad440b56
tree0166afdb7fd6af073e5ce5c0aefd3fd2f8a821c9
parentadb28e0fb2b0e97ea9dce422c09b36979cf7cd2f
TableGen/GlobalISel: Allow output instructions with multiple defs

The DAG behavior allows matchching input patterns with a single result
to the first result of an output instruction that defines multiple
results. The remaining defs are implicitly dead.

This starts to fix using manual selection for AMDGPU add/sub (although
it's still needed, mostly because it's also still needed for
G_PTR_ADD).
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-add.mir
llvm/test/TableGen/Common/GlobalISelEmitterCommon.td
llvm/test/TableGen/GlobalISelEmitter-output-discard.td [new file with mode: 0644]
llvm/utils/TableGen/GlobalISelEmitter.cpp