[PATCH] D104533: [LoopVectorize] Fix strict reductions where VF = 1
Kerry McLaughlin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 18 06:38:37 PDT 2021
kmclaughlin created this revision.
kmclaughlin added reviewers: sdesmalen, david-arm, dmgreen.
Herald added subscribers: bmahjour, hiraditya.
kmclaughlin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Currently we will allow loops with a fixed width VF of 1 to vectorize
if the -enable-strict-reductions flag is set. However, the loop vectorizer
will not use ordered reductions if `VF.isScalar()` and the resulting
vectorized loop will be out of order.
This patch removes `VF.isVector()` when checking if ordered reductions
should be used. Also, instead of converting the FAdds to reductions if the
VF = 1, operands of the FAdds are changed such that the order is preserved.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D104533
Files:
llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/AArch64/strict-fadd.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104533.352993.patch
Type: text/x-patch
Size: 8768 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210618/e3fbed06/attachment.bin>
More information about the llvm-commits
mailing list