Thank you very much for the explanation! Indeed, your code does get vectorized with O2, and if the size is a runtime parameter, it gets vectorized with O3 (but not O2).
And my code doesn't get vectorized, not even with SVE. I must have been using a simpler version of the code when I've seen SVE in action, although it's not a compilated function, only around 50 instructions. So the problem isn't that autovectorization doesn't work, it's that it doesn't work for the hot spot in my code.
And my code doesn't get vectorized, not even with SVE. I must have been using a simpler version of the code when I've seen SVE in action, although it's not a compilated function, only around 50 instructions. So the problem isn't that autovectorization doesn't work, it's that it doesn't work for the hot spot in my code.
Statistics: Posted by VioletGiraffe — Mon Jan 29, 2024 1:05 pm