[PATCH] D126389: [AMDGPU] Improve codegen of extractelement in some cases
Julien Pagès via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 25 09:21:35 PDT 2022
jpages created this revision.
jpages added a project: AMDGPU.
Herald added subscribers: kosarev, jsilvanus, hsmhsm, foad, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl, arsenm.
Herald added a project: All.
jpages requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
This patch improves the codegen of extractelement for vector containing 8 elements.
Before, a dag combine transformation was generating a sequence of 8 select/cmp.
This patch changes the upper limit for this transformation and the movrel
instruction will eventually be used instead.
Extractlement for vectors containing less than 8 elements are unchanged.
This patch is saving some instructions in these cases.
This case was identified in several game shaders.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D126389
Files:
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/extractelement.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.i16.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/insertelement.ll
llvm/test/CodeGen/AMDGPU/extract_vector_dynelt.ll
llvm/test/CodeGen/AMDGPU/insert_vector_dynelt.ll
llvm/test/CodeGen/AMDGPU/insert_vector_elt.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126389.432015.patch
Type: text/x-patch
Size: 99036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220525/4b7faeae/attachment.bin>
More information about the llvm-commits
mailing list