[PATCH] D103814: [LoopVectorize] Don't use strict reductions when reordering is allowed

Kerry McLaughlin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 7 09:25:43 PDT 2021


kmclaughlin added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1307
 
+  bool useOrderedReductions(RecurrenceDescriptor &RdxDesc) {
+    return EnableStrictReductions && !Hints->allowReordering() &&
----------------
sdesmalen wrote:
> Is this interface in the CostModel necessary? It seems the one in InnerLoopVectorizer sufficient?
Hi @sdesmalen, I think the interface in the CostModel is necessary for other places where useOrderedReductions is called that aren't changed by this patch, e.g. `LoopVectorizationCostModel::collectInLoopReductions()`


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103814/new/

https://reviews.llvm.org/D103814



More information about the llvm-commits mailing list