[all-commits] [llvm/llvm-project] ba74bb: [SLP]Fix reused extracts cost.

Andrew V. Tischenko via All-commits all-commits at lists.llvm.org
Thu Dec 2 10:54:05 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ba74bb3a226e1b4660537f274627285b1bf41ee1
      https://github.com/llvm/llvm-project/commit/ba74bb3a226e1b4660537f274627285b1bf41ee1
  Author: Alexey Bataev <a.bataev at outlook.com>
  Date:   2021-12-02 (Thu, 02 Dec 2021)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
    M llvm/test/Transforms/SLPVectorizer/X86/extractelement-multiple-uses.ll

  Log Message:
  -----------
  [SLP]Fix reused extracts cost.

If the extractelement instruction is used multiple times in the
different tree entries (either vectorized, or gathered), need to
compensate the scalar cost of such instructions. They are completely
removed if all users are part of the tree but we need to compensate the
cost only once for each instruction.

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




More information about the All-commits mailing list