[PATCH] D153504: [DAG][AArch64] Fold shuffle_vector<4,5,6,7> to extract_subvector

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 00:17:41 PDT 2023


dmgreen created this revision.
dmgreen added reviewers: RKSimon, SjoerdMeijer, craig.topper, spatel.
Herald added subscribers: StephenFan, hiraditya, kristof.beyls.
Herald added a project: All.
dmgreen requested review of this revision.
Herald added a project: LLVM.

During legalization, we can end up with shuffles that are identity masks, so act like extract_subvector, but do not simplify to extract_subvector. This adjusts the profitability heuristic in foldExtractSubvectorFromShuffleVector to allow identity vectors that do not start at element 0. Undef masks elements are excluded as it can be more useful to keep the undef elements.


https://reviews.llvm.org/D153504

Files:
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/test/CodeGen/AArch64/add-extract.ll
  llvm/test/CodeGen/AArch64/shuffles.ll
  llvm/test/CodeGen/AArch64/sve-fixed-length-shuffles.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153504.533485.patch
Type: text/x-patch
Size: 5543 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230622/943fd1cc/attachment.bin>


More information about the llvm-commits mailing list