[PATCH] D81415: [LoopVectorizer] Don't create unused block masks for reductions. NFC

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 23 03:08:21 PDT 2020


SjoerdMeijer added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1306
+  bool hasOutOfLoopReductions() const {
+    return !Legal->getReductionVars().empty();
+  }
----------------
Quick question on terminology and "inside" and "outside".
`getReductionVars()` returns "reduction variables found in the loop". Here you're actually checking if there are inside loop reductions. But having inside reductions means there's a statement/loop after the vectorised loop that sums the partial reductions/sums, correct? If so, it's probably worth clarifying this a bit.  


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

https://reviews.llvm.org/D81415





More information about the llvm-commits mailing list