[all-commits] [llvm/llvm-project] ff64b2: [LoopVectorize] Check the number of uses of an FAd...

kmclaughlin-arm via All-commits all-commits at lists.llvm.org
Thu Nov 18 08:43:41 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ff64b2933a7df36b92630cef0e86995109a19e82
      https://github.com/llvm/llvm-project/commit/ff64b2933a7df36b92630cef0e86995109a19e82
  Author: Kerry McLaughlin <kerry.mclaughlin at arm.com>
  Date:   2021-11-18 (Thu, 18 Nov 2021)

  Changed paths:
    M llvm/lib/Analysis/IVDescriptors.cpp
    M llvm/test/Transforms/LoopVectorize/AArch64/strict-fadd.ll

  Log Message:
  -----------
  [LoopVectorize] Check the number of uses of an FAdd before classifying as ordered

checkOrderedReductions looks for Phi nodes which can be classified as in-order,
meaning they can be vectorised without unsafe math. In order to vectorise the
reduction it should also be classified as in-loop by getReductionOpChain, which
checks that the reduction has two uses.

In this patch, a similar check is added to checkOrderedReductions so that we
now return false if there are more than two uses of the FAdd instruction.
This fixes PR52515.

Reviewed By: fhahn, david-arm

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




More information about the All-commits mailing list