public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/56286] New: vectorizer does not keep loop-closed SSA up-to-date
@ 2013-02-11 12:45 rguenth at gcc dot gnu.org
  2013-02-11 12:55 ` [Bug tree-optimization/56286] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-02-11 12:45 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 56286
           Summary: vectorizer does not keep loop-closed SSA up-to-date
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rguenth@gcc.gnu.org


The vectorizer relies on the bug that cfgcleaup for no changed bbs from
fix_loop_structure rewrites the whole function into loop-closed-SSA again.

Loop-closed PHI node creation in vect_create_epilog_for_reduction does
not handle outer loop uses of the reduction result properly (those uses
are not yet vectorized).  For example gcc.dg/pr50133.c.


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

* [Bug tree-optimization/56286] vectorizer does not keep loop-closed SSA up-to-date
  2013-02-11 12:45 [Bug tree-optimization/56286] New: vectorizer does not keep loop-closed SSA up-to-date rguenth at gcc dot gnu.org
@ 2013-02-11 12:55 ` rguenth at gcc dot gnu.org
  2014-06-24 10:42 ` rguenth at gcc dot gnu.org
  2024-03-09 23:42 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-02-11 12:55 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |compile-time-hog,
                   |                            |wrong-code
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2013-02-11
         AssignedTo|unassigned at gcc dot       |rguenth at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> 2013-02-11 12:55:06 UTC ---
This blocks fixing of tree-ssa-loop-manip.c:find_uses_to_rename

   /* ??? If CHANGED_BBS is empty we rewrite the whole function -- why?  */
   if (changed_bbs && !bitmap_empty_p (changed_bbs))
     {
       EXECUTE_IF_SET_IN_BITMAP (changed_bbs, 0, index, bi)

which can be a major resource hog.  Also relying on that bug is broken,
without checking we can end up generating wrong-code this way.

Incremental betterness can be achieved by

Index: gcc/tree-vect-stmts.c
===================================================================
--- gcc/tree-vect-stmts.c       (revision 195938)
+++ gcc/tree-vect-stmts.c       (working copy)
@@ -5834,46 +5834,6 @@ vect_transform_stmt (gimple stmt, gimple
        }
     }

-  /* Handle inner-loop stmts whose DEF is used in the loop-nest that
-     is being vectorized, but outside the immediately enclosing loop.  */
-  if (vec_stmt
...
-           }
-       }
-    }
-
   /* Handle stmts whose DEF is used outside the loop-nest that is
      being vectorized.  */


But still

FAIL: gcc.dg/vect/no-scevccp-outer-22.c (internal compiler error)
FAIL: gcc.dg/vect/no-scevccp-outer-22.c (test for excess errors)
WARNING: gcc.dg/vect/no-scevccp-outer-22.c compilation failed to produce
executable
FAIL: gcc.dg/vect/no-scevccp-noreassoc-outer-4.c (internal compiler error)
FAIL: gcc.dg/vect/no-scevccp-noreassoc-outer-4.c (test for excess errors)
WARNING: gcc.dg/vect/no-scevccp-noreassoc-outer-4.c compilation failed to
produce executable
FAIL: gcc.dg/vect/no-scevccp-noreassoc-outer-4.c scan-tree-dump-times vect
"OUTER LOOP VECTORIZED." 1


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

* [Bug tree-optimization/56286] vectorizer does not keep loop-closed SSA up-to-date
  2013-02-11 12:45 [Bug tree-optimization/56286] New: vectorizer does not keep loop-closed SSA up-to-date rguenth at gcc dot gnu.org
  2013-02-11 12:55 ` [Bug tree-optimization/56286] " rguenth at gcc dot gnu.org
@ 2014-06-24 10:42 ` rguenth at gcc dot gnu.org
  2024-03-09 23:42 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-24 10:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Note the ??? is now moved to tree-vectorizer.c:

  if (num_vectorized_loops > 0)
    {
      /* If we vectorized any loop only virtual SSA form needs to be updated.
         ???  Also while we try hard to update loop-closed SSA form we fail
         to properly do this in some corner-cases (see PR56286).  */
      rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa_only_virtuals);
      return TODO_cleanup_cfg;


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

* [Bug tree-optimization/56286] vectorizer does not keep loop-closed SSA up-to-date
  2013-02-11 12:45 [Bug tree-optimization/56286] New: vectorizer does not keep loop-closed SSA up-to-date rguenth at gcc dot gnu.org
  2013-02-11 12:55 ` [Bug tree-optimization/56286] " rguenth at gcc dot gnu.org
  2014-06-24 10:42 ` rguenth at gcc dot gnu.org
@ 2024-03-09 23:42 ` pinskia at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-09 23:42 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |FIXME
   Last reconfirmed|2013-02-11 00:00:00         |2024-3-9

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The fixme is still there:
      /* If we vectorized any loop only virtual SSA form needs to be updated.
         ???  Also while we try hard to update loop-closed SSA form we fail
         to properly do this in some corner-cases (see PR56286).  */
      rewrite_into_loop_closed_ssa (NULL, TODO_update_ssa_only_virtuals);
      ret |= TODO_cleanup_cfg;

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

end of thread, other threads:[~2024-03-09 23:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-11 12:45 [Bug tree-optimization/56286] New: vectorizer does not keep loop-closed SSA up-to-date rguenth at gcc dot gnu.org
2013-02-11 12:55 ` [Bug tree-optimization/56286] " rguenth at gcc dot gnu.org
2014-06-24 10:42 ` rguenth at gcc dot gnu.org
2024-03-09 23:42 ` pinskia 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).