[AMDGPU][GlobalISel] Support mad/fma_mix selection
authorPierre van Houtryve <pierre.vanhoutryve@amd.com>
Wed, 28 Sep 2022 07:47:35 +0000 (07:47 +0000)
committerPierre van Houtryve <pierre.vanhoutryve@amd.com>
Tue, 8 Nov 2022 08:02:34 +0000 (08:02 +0000)
commit767999fca84819c74166bc6768806ed72f00e601
tree5f12255934790614b6dabe79c7116d5471f14386
parentd1f90b61292045d395ba5b94bc9098f4b5d4e55d
[AMDGPU][GlobalISel] Support mad/fma_mix selection

Adds support for selecting the following instructions using GlobalISel:
- v_mad_mix/v_fma_mix
- v_mad_mixhi/v_fma_mixhi
- v_mad_mixlo/v_fma_mixlo

To select those instructions properly, some additional changes were
needed which impacted other tests as well.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D134354
llvm/lib/Target/AMDGPU/AMDGPUGISel.td
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.h
llvm/lib/Target/AMDGPU/VOP3PInstructions.td
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-add-ext-fma.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-add-ext-mul.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-sub-ext-mul.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/combine-fma-sub-ext-neg-mul.ll
llvm/test/CodeGen/AMDGPU/mad-mix-hi.ll
llvm/test/CodeGen/AMDGPU/mad-mix-lo.ll
llvm/test/CodeGen/AMDGPU/mad-mix.ll