[Bug tree-optimization/56688] static/saved variables prevent loop vectorization.

2021-10-01 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56688

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

 CC|anlauf at gmx dot de   |anlauf at gcc dot 
gnu.org

--- Comment #9 from anlauf at gcc dot gnu.org ---
The loop can be vectorized if the final value of the 'saved' scalar can be
determined.

Some vectorizing compilers (Cray, NEC) offer directives (e.g. lstval/nolstval)
to control the evaluation of that scalar, and sometimes suggest to add that
directive in front of the loop.

I think the requirements for handling this are very similar to those for the
OpenMP lastprivate declaration.

[Bug tree-optimization/56688] static/saved variables prevent loop vectorization.

2016-07-22 Thread ysrumyan at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56688

--- Comment #8 from Yuri Rumyantsev  ---
I checked that if we comment down 'save' stmt in thin6d.f all loops will be
vectorized:
grep -c 'LOOP VECTORIZED' thin6d.f.149t.vect 32