[PATCH] D102748: [LoopUnroll] Don't unroll before vectorisation

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 19 10:31:25 PDT 2021


reames added a comment.

Not directly on topic for this review, but looking at some of the examples given, I'd point out that these are simply missed optimizations.  If we're given vectorized IR and not performing other simple optimization (loop idiom, dce, etc..), those are optimization bugs we should probably fix.

It also sounds like it might be worth having the vectorizer recognize the case where it can vectorize all iterations in a single vector iteration and break the backedge if so.  This would avoid the need for another pass of loop deletion or unrolling before scalar opts could easily kick in.

If we improved the robustness of our other optimizations w.r.t. vector instructions, we'd probably be a lot less sensitive to the proposed pass reordering.


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

https://reviews.llvm.org/D102748



More information about the llvm-commits mailing list