[Bug c++/61245] #pragma GCC ivdep is ignored with call inside the test of a for loop

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Jun 20 09:38:06 GMT 2021


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61245

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The loop is still vectorized though. As it looks like it was versioned.

t6.cc: In function ‘void doT(SoA<N>&) [with int N = 3]’:
t6.cc:34:17: warning: ignoring loop annotation
   34 |   for (auto i=0U; i<soa.size(); ++i)
      |                 ^
t6.cc:10:17: optimized: loop vectorized using 16 byte vectors
t6.cc:10:17: optimized: loop vectorized using 8 byte vectors
t6.cc:34:17: optimized: loop vectorized using 16 byte vectors
t6.cc:34:17: optimized:  loop versioned for vectorization because of possible
aliasing
t6.cc:34:17: optimized: loop vectorized using 8 byte vectors

I don't know how useful "#pragma GCC ivdep" is these days really.


More information about the Gcc-bugs mailing list