AMDGPU: Cleanup and fix SMRD offset handling
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 30 Jan 2020 16:42:58 +0000 (11:42 -0500)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Thu, 30 Jan 2020 23:04:21 +0000 (15:04 -0800)
commit17dbc6611df9044d779d85b3d545bd37e5dd5200
tree74e9087d7eff772e6b51487691c0fb1f0b9972ab
parenteb7f74e300554eb20b1f256ffed7bde172a5bf69
AMDGPU: Cleanup and fix SMRD offset handling

I believe this also fixes bugs with CI 32-bit handling, which was
incorrectly skipping offsets that look like signed 32-bit values. Also
validate the offsets are dword aligned before folding.
llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
llvm/lib/Target/AMDGPU/SIFrameLowering.cpp
llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h
llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-load-constant.mir
llvm/test/CodeGen/AMDGPU/cgp-addressing-modes.ll
llvm/test/CodeGen/AMDGPU/llvm.amdgcn.s.buffer.load.ll