[AMDGPU] Handle legacy multiply-accumulate opcodes in convertToThreeAddress
authorJay Foad <jay.foad@amd.com>
Mon, 28 Feb 2022 16:56:19 +0000 (16:56 +0000)
committerJay Foad <jay.foad@amd.com>
Tue, 1 Mar 2022 16:58:00 +0000 (16:58 +0000)
commit289339140e7121d6ed48a3bd556eb429163e04b0
tree4ae9f551560d54c017da0d84eb6d931aaf48d481
parent9ac3a8504736dc1dbe249a31ebbaa0f861e576eb
[AMDGPU] Handle legacy multiply-accumulate opcodes in convertToThreeAddress

Handle V_MAC_LEGACY_F32 and V_FMAC_LEGACY_F32 in
convertToThreeAddress, to avoid the need for an extra mov
instruction in some cases.

Differential Revision: https://reviews.llvm.org/D120704
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/llvm.amdgcn.fmul.legacy.ll
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.fma.legacy.ll
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.fmul.legacy.ll