[AMDGPU] Take advantage of VOP3 literals in convertToThreeAddress
authorJay Foad <jay.foad@amd.com>
Tue, 2 Aug 2022 16:09:58 +0000 (17:09 +0100)
committerJay Foad <jay.foad@amd.com>
Tue, 2 Aug 2022 16:27:11 +0000 (17:27 +0100)
commitc24d68fff1fe8d3115c411d6e81092eb1f855b52
tree37bcfc2e9bb20d2aae69ae0f6bac1f1697d5dfee
parent5ec6ea3dfded028de775eb165ce0bae6f1e6c2bf
[AMDGPU] Take advantage of VOP3 literals in convertToThreeAddress

This improves a corner case where v_fmac can be converted to v_fma on
GFX10+ even if it has a literal operand.

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