[PATCH] D101836: [LoopVectorize] Enable strict reductions when allowReordering() returns false

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 12 06:13:34 PDT 2021


david-arm added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp:887
+
+  if (getReductionVars().empty() || !ExactRdxVars)
+    return true;
----------------
nit: This is just a suggestion, but you could rename `ExactRdxVars` to `HasExactRdxVar` and then here simply do:

  return !HasExactRdxVar;

since I think when the list is empty that variable should be false?


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

https://reviews.llvm.org/D101836



More information about the llvm-commits mailing list