[PATCH] D117164: AMDGPU/GlobalISel: Fix selection of constant 32-bit addrspace loads

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 12 15:03:48 PST 2022


arsenm created this revision.
arsenm added reviewers: mareko, foad, mbrkusanin, Petar.Avramovic, sebastian-ne, AMDGPU.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, rovka, yaxunl, nhaehnle, jvesely, kzhuravl.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

Unfortunately the selection patterns still rely on the address space
from the memory operand instead of using the pointer type. Add this
address space to the list of cases supported by global-like loads.

      

Alternatively we would have to adjust the address space of the memory
operand to deviate from the underlying IR value, which looks ugly and
is more work in the legalizer.

      

This doesn't come up in the DAG path because it uses a different
selection strategy where the cast is inserted during the addressing
mode matching.


https://reviews.llvm.org/D117164

Files:
  llvm/lib/Target/AMDGPU/AMDGPUInstructions.td
  llvm/test/CodeGen/AMDGPU/GlobalISel/load-constant32bit.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117164.399483.patch
Type: text/x-patch
Size: 5833 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220112/241d4ad5/attachment.bin>


More information about the llvm-commits mailing list