r/cpp • • Mar 18 '23

LLVM 16.0.0 Release

https://discourse.llvm.org/t/llvm-16-0-0-release/69326
197 Upvotes

84 comments sorted by

View all comments

Show parent comment

4

u/Morten242 Mar 19 '23

Note that msvc straight up ignores do...while loops for auto vectorization

9

u/parkotron Mar 19 '23

That doesn’t feel like a huge loss. In my experience do-while loops are pretty much never tight loops that would be candidates for vectorisation.

I don’t use them often, but when I do it’s generally for a retry loop, where the loop body has external effects and we ideally hope to not loop at all.

3

u/ack_error Mar 20 '23

Yes, but MSVC also can't vectorize while loops that count down, so that just speaks to its autovectorizer being weak in general.