AMDGPU/GlobalISel: Widen non-power-of-2 load results
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Tue, 21 Jan 2020 18:23:45 +0000 (13:23 -0500)
committerMatt Arsenault <arsenm2@gmail.com>
Wed, 12 Feb 2020 14:35:10 +0000 (09:35 -0500)
commitfa61e200e53aaa929276abd76482a15c7a9638b7
tree96de685fc12b0f506259a15643484d9cd7fda3c1
parent271e495399170d69627c1acd591c9298cb0b5b4b
AMDGPU/GlobalISel: Widen non-power-of-2 load results

Load extra bits if suitably aligned. This allows using widened
3-vector loads on SI, and fixes legalization for <9 x s32> (which LSV
apparently forms frequently on lowered kernel argument lists).

Fix incorrectly treating these as legal on SI. This should emit a
64-bit store and a 32-bit store.

I think all of the load and store rules are just about complete, but
due for a rewrite.
llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-constant.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-flat.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-global.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-local.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-load-private.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-store-global.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-store.mir
llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.s.buffer.load.ll