[PATCH] D117307: [LoopVectorize] Only check for ordered reductions if the op chain was found

Kerry McLaughlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 14 06:48:46 PST 2022


kmclaughlin created this revision.
kmclaughlin added reviewers: david-arm, dmgreen, sdesmalen.
Herald added a subscriber: hiraditya.
kmclaughlin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

As we cannot vectorise strict reductions if the reduction is not also
classified as in-loop, we should not call checkOrderedReductions
if getReductionOpChain was not able to find the chain.

This removes the additional check on the number of uses of `Exit` in
checkOrderedReductions introduced in D114002 <https://reviews.llvm.org/D114002>, added to fix an issue
where IsOrdered was true but the reduction op chain was not found.

The `!LoopExitInstr->hasNUses(2)` restriction has also been removed from
getReductionOpChain.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D117307

Files:
  llvm/include/llvm/Analysis/IVDescriptors.h
  llvm/lib/Analysis/IVDescriptors.cpp
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D117307.399972.patch
Type: text/x-patch
Size: 11748 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220114/477fbf41/attachment.bin>


More information about the llvm-commits mailing list