3 ms·
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. edi
by gpderetta 7y ago
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.
- BeeOnRope 7y agoI 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_ https://godbolt.org/z/9vZfl_