[PATCH] D151029: [DAG] Combine insert(shuffle(load), load, 0) into a single load

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat May 20 05:58:53 PDT 2023


dmgreen created this revision.
dmgreen added reviewers: RKSimon, SjoerdMeijer, jaykang10, samtebbs, craig.topper.
Herald added subscribers: ecnelises, hiraditya.
Herald added a project: All.
dmgreen requested review of this revision.
Herald added a project: LLVM.

Given an insert of a scalar load into a vector shuffle with mask `u,0,1,2,3,4,5,6` or `1,2,3,4,5,6,7,u` (depending on the insert index), it can be more profitable to convert to a single load and avoid the shuffles. This adds a DAG combine for it, providing the new load is still fast.


https://reviews.llvm.org/D151029

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AArch64/insertshuffleload.ll
  llvm/test/CodeGen/Thumb2/mve-insertshuffleload.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151029.524028.patch
Type: text/x-patch
Size: 29657 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230520/c7148a9a/attachment.bin>


More information about the llvm-commits mailing list