[PATCH] D15425: AMDGPU/SI: Select constant loads with non-uniform addresses to MUBUF instructions

Tom Stellard via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 10:42:02 PST 2015


tstellarAMD created this revision.
tstellarAMD added a reviewer: arsenm.
tstellarAMD added a subscriber: llvm-commits.
Herald added a subscriber: arsenm.

We were previously selecting all constant loads to SMRD instructions and legalizing
the SMRDs with non-uniform addresses during the SIFixSGPRCopesPass.

This new solution is more simple and also generates much better code, because
the instruction selector is able to take advantage of all the MUBUF addressing
modes that are legalization pass wasn't able to.

We also no longer need to generate v_add_* instructions when we
have a uniform pointer and a non-uniform offset, as this is now folded into the
MUBUF instruction during instruction selection.

http://reviews.llvm.org/D15425

Files:
  lib/Target/AMDGPU/AMDGPU.h
  lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp
  lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
  lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp
  lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h
  lib/Target/AMDGPU/CMakeLists.txt
  lib/Target/AMDGPU/SIISelLowering.cpp
  lib/Target/AMDGPU/SIISelLowering.h
  lib/Target/AMDGPU/SIInstrInfo.td
  lib/Target/AMDGPU/SIInstructions.td
  test/CodeGen/AMDGPU/salu-to-valu.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15425.42446.patch
Type: text/x-patch
Size: 19586 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151210/20a6b799/attachment.bin>


More information about the llvm-commits mailing list