[all-commits] [llvm/llvm-project] 944cc5: [SelectionDAGBuilder][CGP][X86] Move some of SDB's...

topperc via All-commits all-commits at lists.llvm.org
Thu Apr 16 17:50:35 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 944cc5e0ab5c1323e6cd9c3a72e8de89bd8a67b0
      https://github.com/llvm/llvm-project/commit/944cc5e0ab5c1323e6cd9c3a72e8de89bd8a67b0
  Author: Craig Topper <craig.topper at gmail.com>
  Date:   2020-04-16 (Thu, 16 Apr 2020)

  Changed paths:
    M llvm/lib/CodeGen/CodeGenPrepare.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
    M llvm/test/CodeGen/X86/masked_gather.ll
    M llvm/test/CodeGen/X86/masked_gather_scatter.ll
    M llvm/test/CodeGen/X86/pr45067.ll
    A llvm/test/Transforms/CodeGenPrepare/X86/gather-scatter-opt.ll

  Log Message:
  -----------
  [SelectionDAGBuilder][CGP][X86] Move some of SDB's gather/scatter uniform base handling to CGP.

I've always found the "findValue" a little odd and
inconsistent with other things in SDB.

This simplfifies the code in SDB to just handle a splat constant
address or a 2 operand GEP in the same BB. This removes the
need for "findValue" since the operands to the GEP are
guaranteed to be available. The splat constant handling is
new, but was needed to avoid regressions due to constant
folding combining GEPs created in CGP.

CGP is now responsible for canonicalizing gather/scatters into
this form. The pattern I'm using for scalarizing, a scalar GEP
followed by a GEP with an all zeroes index, seems to be subject
to constant folding that the insertelement+shufflevector was not.

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




More information about the All-commits mailing list