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

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 24 07:21:17 PDT 2021


david-arm added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp:874-875
+
+  if (!EnableStrictReductions)
+    return false;
+
----------------
sdesmalen wrote:
> nit: can you fold this into the condition below:
> 
>   if (!EnableStrictReductions || any_of(...))
>     return false;
I guess the comment below will need updating too if the check is moved.


================
Comment at: llvm/test/Transforms/LoopVectorize/AArch64/strict-fadd.ll:621
+  %exitcond.not = icmp eq i64 %iv.next, %N
+  br i1 %exitcond.not, label %for.end, label %for.body
+
----------------
Are these new tests missing hints that the other tests seem to use? I just wondered if it was better to be consistent here that's all. The reason I mention this is because I was expecting the UNORDERED case to vectorise due to the `-hints-allow-reordering=true` flag.


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

https://reviews.llvm.org/D101836



More information about the llvm-commits mailing list