[all-commits] [llvm/llvm-project] 14f54a: [DAG][AArch64] Fold shuffle_vector<4, 5, 6, 7> to ext...

David Green via All-commits all-commits at lists.llvm.org
Fri Jun 30 03:13:54 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 14f54a594e5b5e215844f03e598805bd8c377003
      https://github.com/llvm/llvm-project/commit/14f54a594e5b5e215844f03e598805bd8c377003
  Author: David Green <david.green at arm.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

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

  Log Message:
  -----------
  [DAG][AArch64] Fold shuffle_vector<4,5,6,7> to extract_subvector

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.

Differential Revision: https://reviews.llvm.org/D153504




More information about the All-commits mailing list