[PATCH] D72166: AMDGPU/GlobalISel: Fold constant offset vector extract indexes

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 3 09:18:33 PST 2020


arsenm created this revision.
arsenm added reviewers: tstellar, nhaehnle, kerbowa.
Herald added subscribers: Petar.Avramovic, arphaman, hiraditya, t-tye, tpr, dstuttard, rovka, yaxunl, wdng, jvesely, kzhuravl.
Herald added a project: LLVM.
arsenm added parent revisions: D72126: AMDGPU/GlobalISel: Select G_EXTRACT_VECTOR_ELT, D72120: AMDGPU/GlobalISel: Fix G_EXTRACT_VECTOR_ELT mapping for s-v case, D72149: AMDGPU/GlobalISel: Add new utils file.

Handle dynamic vector extracts that use an index that's an add of a
constant offset into moving the base subregister of the indexing
operation.

Force the add into the loop in regbankselect, which will be recognized
when selected.


https://reviews.llvm.org/D72166

Files:
  llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
  llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/inst-select-extract-vector-elt.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-extract-vector-elt.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72166.236077.patch
Type: text/x-patch
Size: 60248 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200103/0fe023fe/attachment.bin>


More information about the llvm-commits mailing list