[all-commits] [llvm/llvm-project] 2be318: [AMDGPU] Don't select _SGPR forms of SMEM instruct...
Jay Foad via All-commits
all-commits at lists.llvm.org
Mon Apr 17 08:23:47 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2be31896013dd316e10e6cb36321deb62d26e8f7
https://github.com/llvm/llvm-project/commit/2be31896013dd316e10e6cb36321deb62d26e8f7
Author: Jay Foad <jay.foad at amd.com>
Date: 2023-04-17 (Mon, 17 Apr 2023)
Changed paths:
M llvm/lib/Target/AMDGPU/AMDGPU.td
M llvm/lib/Target/AMDGPU/SMInstructions.td
M llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-load-constant.mir
M llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-load-smrd.mir
M llvm/test/CodeGen/AMDGPU/amdgcn-load-offset-from-reg.ll
M llvm/test/CodeGen/AMDGPU/smrd-gfx10.ll
M llvm/test/CodeGen/AMDGPU/splitkit-getsubrangeformask.ll
Log Message:
-----------
[AMDGPU] Don't select _SGPR forms of SMEM instructions on GFX9+
On GFX9+, SMEM instructions have an _SGPR_IMM form which is strictly
more powerful than the _SGPR form. It simplifies codegen if we always
select the _SGPR_IMM form with an immediate offset of 0 instead of the
_SGPR form.
Note that this patch just makes minimal changes to the selection
patterns to prove the concept. Further simplifications are possible to
reduced the number of selection patterns.
On GFX9 the _SGPR form of the Real instruction is still required for
assembly/disassembly but on GFX10+ it can be removed completely.
Differential Revision: https://reviews.llvm.org/D147334
More information about the All-commits
mailing list