[all-commits] [llvm/llvm-project] 34d88c: [DAG] Allow folding AND of anyext masked_load with...

Benjamin Maxwell via All-commits all-commits at lists.llvm.org
Fri Nov 18 02:38:32 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 34d88cf6cfe9f878e6330f157f178c2b104c3949
      https://github.com/llvm/llvm-project/commit/34d88cf6cfe9f878e6330f157f178c2b104c3949
  Author: Benjamin Maxwell <benjamin.maxwell at arm.com>
  Date:   2022-11-18 (Fri, 18 Nov 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/AArch64/sve-load-compare-store.ll
    M llvm/test/CodeGen/Thumb2/mve-masked-load.ll

  Log Message:
  -----------
  [DAG] Allow folding AND of anyext masked_load with >1 user to zext version

This now allows folding an AND of a anyext masked_load to a
zext_masked_load even if the masked load has multiple users.  Doing is
eliminates some redundant ANDs/MOVs for certain AArch64 SVE code.

I'm not sure if there's any cases where doing this could negatively the
other users of the masked_load.  Looking at other optimizations of
masked loads, most don't apply if the load is used more than once, so it
doesn't look like this would interfere.

Reviewed By: c-rhodes

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




More information about the All-commits mailing list