public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/56688] New: Fortran save statement prevents loop vectorization.
@ 2013-03-22 10:49 ysrumyan at gmail dot com
  2013-03-22 13:30 ` [Bug tree-optimization/56688] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ysrumyan at gmail dot com @ 2013-03-22 10:49 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56688

             Bug #: 56688
           Summary: Fortran save statement prevents loop vectorization.
    Classification: Unclassified
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ysrumyan@gmail.com


Analyzing gcc vectorization on 200.sixtrack from spec2000 suite we found out
that only 6 loops are vectorized in the hottest routine (97% run time). The
reason is that save statement is used. This issue can be illustrated by the
following simple example:

    subroutine bar
    implicit real*8 (a-h,o-z)
    parameter (n=700)
    common/my_data/ x1(n), y1(n), z1(n), t1(n)
        save
    do i=1,n
    x = x1(i) - y1(i)
    z1(i) = t1(i) * x
    enddo
    end

and vectorizer issues the following message:

t1.f:6: note: ==> examining statement: _6 = my_data.x1[_5];

t1.f:6: note: num. args = 4 (not unary/binary/ternary op).
t1.f:6: note: vect_is_simple_use: operand my_data.x1[_5]
t1.f:6: note: not ssa-name.
t1.f:6: note: use not simple.
t1.f:6: note: vect_model_load_cost: aligned.
t1.f:6: note: vect_model_load_cost: inside_cost = 1, prologue_cost = 0 .
t1.f:6: note: vect_is_simple_use: operand my_data.x1
t1.f:6: note: not ssa-name.
t1.f:6: note: use not simple.
t1.f:6: note: not vectorized: live stmt not supported: _6 = my_data.x1[_5];

Note also if we comment down svae stmt loop will be vectorized.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-10-01 18:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-22 10:49 [Bug tree-optimization/56688] New: Fortran save statement prevents loop vectorization ysrumyan at gmail dot com
2013-03-22 13:30 ` [Bug tree-optimization/56688] " rguenth at gcc dot gnu.org
2013-03-22 13:31 ` rguenth at gcc dot gnu.org
2013-03-22 14:16 ` Joost.VandeVondele at mat dot ethz.ch
2013-03-22 14:24 ` rguenth at gcc dot gnu.org
2013-03-22 14:25 ` rguenth at gcc dot gnu.org
2015-06-12 14:14 ` alalaw01 at gcc dot gnu.org
2021-10-01 18:23 ` [Bug tree-optimization/56688] static/saved variables prevent " anlauf at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).