[all-commits] [llvm/llvm-project] 100763: [DAG] Extend SearchForAndLoads with any_extend han...

David Green via All-commits all-commits at lists.llvm.org
Tue Jan 18 13:03:21 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 100763a88fe97b22cd5e3f69d203669aac3ed48f
      https://github.com/llvm/llvm-project/commit/100763a88fe97b22cd5e3f69d203669aac3ed48f
  Author: David Green <david.green at arm.com>
  Date:   2022-01-18 (Tue, 18 Jan 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/AArch64/combine-andintoload.ll
    A llvm/test/CodeGen/X86/combine-andintoload.ll
    M llvm/test/CodeGen/X86/pr35763.ll

  Log Message:
  -----------
  [DAG] Extend SearchForAndLoads with any_extend handling

This extends the code in SearchForAndLoads to be able to look through
ANY_EXTEND nodes, which can be created from mismatching IR types where
the AND node we begin from only demands the low parts of the register.
That turns zext and sext into any_extends as only the low bits are
demanded. To be able to look through ANY_EXTEND nodes we need to handle
mismatching types in a few places, potentially truncating the mask to
the size of the final load.

Recommitted with a more conservative check for the type of the extend.

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




More information about the All-commits mailing list