News for hackers. Stuff that matters.
Re:Incrementing vectors by gpderetta on Tuesday August 27, 2019 @10:38AM (#20810002)
That's true. In fact GCC should be able to do that in principle. I guess it only does it if it believes that the vectorization is significantly profitable.

edit: it is possible it only does it on PGO builds.

Re:Incrementing vectors by BeeOnRope on Tuesday August 27, 2019 @11:28AM (#20810619)
I linked an example [1] in a parallel reply that shows gcc (and clang) doing it at -O3 without PGO, for the case of possibly overlapping arrays.

---

[1] https://godbolt.org/z/9vZfl_