[PATCH] D125173: [AMDGPU] lowerEXTRACT_VECTOR_ELT - fold from a SCALAR_TO_VECTOR source
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat May 7 10:19:54 PDT 2022
RKSimon created this revision.
RKSimon added reviewers: foad, arsenm.
Herald added subscribers: jsilvanus, hsmhsm, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl.
Herald added a project: All.
RKSimon requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.
As suggested by @foad on D124839 <https://reviews.llvm.org/D124839>
If we're extracting a vector element that originally came from a scalar_to_vector, then avoid the bitcasting of a vector type and perform the shift masking on the (any-extended) scalar source directly, making use of the fact that the upper elements of a scalar_to_vector are all undef.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D125173
Files:
llvm/lib/Target/AMDGPU/SIISelLowering.cpp
llvm/test/CodeGen/AMDGPU/insert_vector_elt.v2i16.ll
llvm/test/CodeGen/AMDGPU/load-lo16.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D125173.427876.patch
Type: text/x-patch
Size: 9867 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220507/88dc6338/attachment.bin>
More information about the llvm-commits
mailing list