[all-commits] [llvm/llvm-project] 4aaf30: [DAG] Fold vector (aext (load x)) -> (zext (trunca...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Aug 5 03:22:59 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4aaf301fb8f4f666d935fe78ef5d74592eee5fc1
      https://github.com/llvm/llvm-project/commit/4aaf301fb8f4f666d935fe78ef5d74592eee5fc1
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2020-08-05 (Wed, 05 Aug 2020)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/X86/avx512-any_extend_load.ll
    M llvm/test/CodeGen/X86/avx512-shuffles/partial_permute.ll
    M llvm/test/CodeGen/X86/vector-mul.ll

  Log Message:
  -----------
  [DAG] Fold vector (aext (load x)) -> (zext (truncate (zextload x)))

We currently don't do anything to fold any_extend vector loads as no target has such an instruction.

Instead I've added support for folding to a zextload, SimplifyDemandedBits does a good job of adjusting the zext(truncate(()) stages as required later on.

We still need the custom scalar extload handling instead of using the tryToFoldExtOfLoad helper as it has different legality tests - we can probably tweak that to reduce most of the code duplication.

Fixes the regression I mentioned in rG99a971cadff7

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




More information about the All-commits mailing list