[AMDGPU] Handle v_fmac_legacy_f32 in SIFoldOperands
authorJay Foad <jay.foad@amd.com>
Mon, 4 Jan 2021 10:54:42 +0000 (10:54 +0000)
committerJay Foad <jay.foad@amd.com>
Tue, 5 Jan 2021 11:55:33 +0000 (11:55 +0000)
commit3914bebe91f6b557e61d6d74117762f9043593e0
tree60ec0151c18a7320a24f6fde81bc18bf190c9bf8
parent639a50e2f138ed3e647b00809a2871a1b9ae9012
[AMDGPU] Handle v_fmac_legacy_f32 in SIFoldOperands

Convert it to v_fma_legacy_f32 if it is profitable to do so, just like
other mac instructions that are converted to their mad equivalents.

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