AMDGPU/GlobalISel: Start matching s_lshlN_add_u32 instructions
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Fri, 21 Feb 2020 01:26:41 +0000 (20:26 -0500)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 9 Mar 2020 19:36:51 +0000 (12:36 -0700)
commit209094eeb6c64cf515e24844f7420f93083e5dd4
treedf245d9c4a9200d7bab724274eb1185563189ab6
parente4dfc9f5bda3171e159f2ff62390c8795d9497e7
AMDGPU/GlobalISel: Start matching s_lshlN_add_u32 instructions

Use a hack to only enable this for GlobalISel.

Technically this also works with SelectionDAG, but the divergence
selection isn't reliable enough and a few cases fail, but I have no
desire to spend time writing the manual expansion code for it. The DAG
actually does a better job since it catches using v_add_lshl_u32 in
the mixed SGPR/VGPR cases.
llvm/lib/Target/AMDGPU/SIInstrInfo.td
llvm/lib/Target/AMDGPU/SOPInstructions.td
llvm/test/CodeGen/AMDGPU/GlobalISel/shlN_add.ll [new file with mode: 0644]