public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/50208] New: ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with -ftree-vectorize -fno-tree-fre -fno-tree-pre
@ 2011-08-27  9:46 zsojka at seznam dot cz
  2011-08-27  9:48 ` [Bug tree-optimization/50208] [4.7 Regression] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2011-08-27  9:46 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50208
           Summary: ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with
                    -ftree-vectorize -fno-tree-fre -fno-tree-pre
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 25117
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25117
reduced testcase

Compiler output:
$ gcc -O2 -ftree-vectorize -fno-tree-fre -fno-tree-pre testcase.c         
testcase.c: In function 'foo':
testcase.c:4:6: internal compiler error: vector VEC(vec_void_p,base) index
domain error, in vinfo_for_stmt at tree-vectorizer.h:598
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

The testcase was reduced from the PR50039 testcase.

Tested revisions:
r178096 - crash
r177913 - crash
r177543 - OK


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

* [Bug tree-optimization/50208] [4.7 Regression] ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with -ftree-vectorize -fno-tree-fre -fno-tree-pre
  2011-08-27  9:46 [Bug tree-optimization/50208] New: ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with -ftree-vectorize -fno-tree-fre -fno-tree-pre zsojka at seznam dot cz
@ 2011-08-27  9:48 ` rguenth at gcc dot gnu.org
  2011-08-29 10:45 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-27  9:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |irar at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
   Target Milestone|---                         |4.7.0
            Summary|ICE: in vinfo_for_stmt at   |[4.7 Regression] ICE: in
                   |tree-vectorizer.h:598 with  |vinfo_for_stmt at
                   |-ftree-vectorize            |tree-vectorizer.h:598 with
                   |-fno-tree-fre -fno-tree-pre |-ftree-vectorize
                   |                            |-fno-tree-fre -fno-tree-pre


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

* [Bug tree-optimization/50208] [4.7 Regression] ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with -ftree-vectorize -fno-tree-fre -fno-tree-pre
  2011-08-27  9:46 [Bug tree-optimization/50208] New: ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with -ftree-vectorize -fno-tree-fre -fno-tree-pre zsojka at seznam dot cz
  2011-08-27  9:48 ` [Bug tree-optimization/50208] [4.7 Regression] " rguenth at gcc dot gnu.org
@ 2011-08-29 10:45 ` jakub at gcc dot gnu.org
  2011-08-29 11:05 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-08-29 10:45 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-08-29
                 CC|                            |jakub at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-29 10:05:42 UTC ---
Caused by http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=177647


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

* [Bug tree-optimization/50208] [4.7 Regression] ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with -ftree-vectorize -fno-tree-fre -fno-tree-pre
  2011-08-27  9:46 [Bug tree-optimization/50208] New: ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with -ftree-vectorize -fno-tree-fre -fno-tree-pre zsojka at seznam dot cz
  2011-08-27  9:48 ` [Bug tree-optimization/50208] [4.7 Regression] " rguenth at gcc dot gnu.org
  2011-08-29 10:45 ` jakub at gcc dot gnu.org
@ 2011-08-29 11:05 ` jakub at gcc dot gnu.org
  2011-09-01 11:43 ` irar at il dot ibm.com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-08-29 11:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-08-29 10:44:42 UTC ---
The problem is that def_stmt is a gimple stmt from before the loop and
new_loop_vec_info only initializes gimple_uid of stmts in the loop being
processed.
So perhaps before testing for vinfo_for_stmt it should
  || !gimple_bb (def_stmt)
  || !flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
and perhaps give up in those cases too?  Loop would need to be initialized,
perhaps similarly to vect_recog_dot_prod_pattern?
  loop_vec_info loop_info = STMT_VINFO_LOOP_VINFO (vinfo_for_stmt (stmt));
  struct loop *loop = LOOP_VINFO_LOOP (loop_info);
?  I have no idea whether this can be invoked from slp vectorizer and what to
do in that case.


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

* [Bug tree-optimization/50208] [4.7 Regression] ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with -ftree-vectorize -fno-tree-fre -fno-tree-pre
  2011-08-27  9:46 [Bug tree-optimization/50208] New: ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with -ftree-vectorize -fno-tree-fre -fno-tree-pre zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2011-08-29 11:05 ` jakub at gcc dot gnu.org
@ 2011-09-01 11:43 ` irar at il dot ibm.com
  2011-09-01 11:45 ` irar at il dot ibm.com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: irar at il dot ibm.com @ 2011-09-01 11:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Ira Rosen <irar at il dot ibm.com> 2011-09-01 11:42:24 UTC ---
Created attachment 25159
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25159
patch

Right. The attached patch does the suggested checks also in
vect_handle_widen_mult_by_const(). I'll test it on Sunday.

Thanks,
Ira


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

* [Bug tree-optimization/50208] [4.7 Regression] ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with -ftree-vectorize -fno-tree-fre -fno-tree-pre
  2011-08-27  9:46 [Bug tree-optimization/50208] New: ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with -ftree-vectorize -fno-tree-fre -fno-tree-pre zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2011-09-01 11:43 ` irar at il dot ibm.com
@ 2011-09-01 11:45 ` irar at il dot ibm.com
  2011-09-04  9:24 ` irar at gcc dot gnu.org
  2011-09-04 11:00 ` irar at il dot ibm.com
  6 siblings, 0 replies; 8+ messages in thread
From: irar at il dot ibm.com @ 2011-09-01 11:45 UTC (permalink / raw)
  To: gcc-bugs

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

Ira Rosen <irar at il dot ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |irar at il dot ibm.com

--- Comment #4 from Ira Rosen <irar at il dot ibm.com> 2011-09-01 11:44:19 UTC ---
(In reply to comment #2)
> I have no idea whether this can be invoked from slp vectorizer and what to
> do in that case.

Pattern detection is not called from SLP at the moment.


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

* [Bug tree-optimization/50208] [4.7 Regression] ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with -ftree-vectorize -fno-tree-fre -fno-tree-pre
  2011-08-27  9:46 [Bug tree-optimization/50208] New: ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with -ftree-vectorize -fno-tree-fre -fno-tree-pre zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2011-09-01 11:45 ` irar at il dot ibm.com
@ 2011-09-04  9:24 ` irar at gcc dot gnu.org
  2011-09-04 11:00 ` irar at il dot ibm.com
  6 siblings, 0 replies; 8+ messages in thread
From: irar at gcc dot gnu.org @ 2011-09-04  9:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from irar at gcc dot gnu.org 2011-09-04 09:22:42 UTC ---
Author: irar
Date: Sun Sep  4 09:22:38 2011
New Revision: 178508

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178508
Log:

        PR tree-optimization/50208
        * tree-vect-patterns.c (vect_handle_widen_mult_by_const): Add an
        argument.  Check that def_stmt is inside the loop.
        (vect_recog_widen_mult_pattern): Update calls to
        vect_handle_widen_mult_by_cons.
        (vect_operation_fits_smaller_type): Check that def_stmt is
        inside the loop.


Added:
    trunk/gcc/testsuite/gcc.dg/vect/no-fre-pre-pr50208.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/vect/vect.exp
    trunk/gcc/tree-vect-patterns.c


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

* [Bug tree-optimization/50208] [4.7 Regression] ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with -ftree-vectorize -fno-tree-fre -fno-tree-pre
  2011-08-27  9:46 [Bug tree-optimization/50208] New: ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with -ftree-vectorize -fno-tree-fre -fno-tree-pre zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2011-09-04  9:24 ` irar at gcc dot gnu.org
@ 2011-09-04 11:00 ` irar at il dot ibm.com
  6 siblings, 0 replies; 8+ messages in thread
From: irar at il dot ibm.com @ 2011-09-04 11:00 UTC (permalink / raw)
  To: gcc-bugs

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

Ira Rosen <irar at il dot ibm.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #6 from Ira Rosen <irar at il dot ibm.com> 2011-09-04 10:58:58 UTC ---
Fixed.


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

end of thread, other threads:[~2011-09-04 11:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-27  9:46 [Bug tree-optimization/50208] New: ICE: in vinfo_for_stmt at tree-vectorizer.h:598 with -ftree-vectorize -fno-tree-fre -fno-tree-pre zsojka at seznam dot cz
2011-08-27  9:48 ` [Bug tree-optimization/50208] [4.7 Regression] " rguenth at gcc dot gnu.org
2011-08-29 10:45 ` jakub at gcc dot gnu.org
2011-08-29 11:05 ` jakub at gcc dot gnu.org
2011-09-01 11:43 ` irar at il dot ibm.com
2011-09-01 11:45 ` irar at il dot ibm.com
2011-09-04  9:24 ` irar at gcc dot gnu.org
2011-09-04 11:00 ` irar at il dot ibm.com

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).