[PATCH] D116115: AMDGPU/GlobalISel: Rework legalization for extract/insert vector elt

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 21 08:49:33 PST 2021


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

Use G_MERGE_VALUES and G_UNMERGE_VALUES on vector elements instead of
G_EXTRACT and G_INSERT when doing custom legalization for
G_EXTRACT_VECTOR_ELT and  G_INSERT_VECTOR_ELT.
With this approach legalization artifact combiner gets simple access
to all vector elements.


https://reviews.llvm.org/D116115

Files:
  llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
  llvm/test/CodeGen/AMDGPU/GlobalISel/bug-legalization-artifact-combiner-dead-def.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.large.ll
  llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-extract-vector-elt.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-insert-vector-elt.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-shuffle-vector.mir
  llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-shuffle-vector.s16.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116115.395696.patch
Type: text/x-patch
Size: 61020 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211221/c6ad87ef/attachment-0001.bin>


More information about the llvm-commits mailing list