[all-commits] [llvm/llvm-project] d633db: [SLP][NFC] Pre-commit test showing vectorization p...

Bill Schmidt via All-commits all-commits at lists.llvm.org
Thu May 19 06:58:59 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d633dbd195732fe2e343297c37afcb2c3be71d14
      https://github.com/llvm/llvm-project/commit/d633dbd195732fe2e343297c37afcb2c3be71d14
  Author: William Schmidt <william.schmidt at intel.com>
  Date:   2022-05-19 (Thu, 19 May 2022)

  Changed paths:
    A llvm/test/Transforms/SLPVectorizer/X86/slp-fma-loss.ll

  Log Message:
  -----------
  [SLP][NFC] Pre-commit test showing vectorization preventing FMA

When we generate a horizontal reduction of floating adds fed by a vectorized
tree rooted at floating multiplies, we should account for the cost of no
longer being able to generate scalar FMAs.  Similarly, if we vectorize a
list of floating multiplies that each feeds a single floating add, we should
again account for this cost.

The first test was reduced from a case where the vectorizable tree looked
barely profitable (cost -1) with a horizontal reduction, but produced
substantially worse code than allowing the FMAs to be generated.  The second
test was derived from the first: we again generate a horizontal reduction
here, but even if the horizontal reduction is forced to be unprofitable, we
try to vectorize the multiplies.  I have follow-up patches to address these
issues.

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




More information about the All-commits mailing list