[AMDGPU] Use v_fma_f16 on GFX10
authorJay Foad <jay.foad@amd.com>
Tue, 14 Dec 2021 15:47:44 +0000 (15:47 +0000)
committerJay Foad <jay.foad@amd.com>
Wed, 15 Dec 2021 13:14:48 +0000 (13:14 +0000)
commit54fc9eb9b313497cf34ae569391e76db56b65e70
tree76f0c9dbaadcf6a24bfdf1f5a1347ffc5f403045
parent4db74227719324786824fa76004a06d0147b7a85
[AMDGPU] Use v_fma_f16 on GFX10

Teach convertToThreeAddress to use the V_FMA_F16_gfx9 pseudo (i.e. the
standard instruction in GFX9 onwards) instead of V_FMA_F16 (the legacy
pseudo for GFX8 compatibility, which is no longer supported in GFX10).
This follows the example of macToMad in SIFoldOperands.

Differential Revision: https://reviews.llvm.org/D115731
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-add-fma-mul.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-add-mul.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/fma.ll
llvm/test/CodeGen/AMDGPU/strict_fma.f16.ll