[all-commits] [llvm/llvm-project] 774021: [DAG] Combine insert(shuffle(load), load, 0) into ...

David Green via All-commits all-commits at lists.llvm.org
Wed May 31 11:49:11 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7740216f2e1e6f4243a868bc41b9397ad2c7fb38
      https://github.com/llvm/llvm-project/commit/7740216f2e1e6f4243a868bc41b9397ad2c7fb38
  Author: David Green <david.green at arm.com>
  Date:   2023-05-31 (Wed, 31 May 2023)

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

  Log Message:
  -----------
  [DAG] Combine insert(shuffle(load), load, 0) into a single load

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.

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




More information about the All-commits mailing list