public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/55110] New: Internal compiler error in vectorizable_reduction, at tree-vect-loop.c:4633
@ 2012-10-28 17:37 antoine.balestrat at gmail dot com
2012-10-29 12:14 ` [Bug tree-optimization/55110] " mpolacek at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: antoine.balestrat at gmail dot com @ 2012-10-28 17:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55110
Bug #: 55110
Summary: Internal compiler error in vectorizable_reduction, at
tree-vect-loop.c:4633
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: antoine.balestrat@gmail.com
Hello !
The following testcase makes GCC 4.8.0 as of 20121021 crash with -O1
-ftree-vectorize.
$ cat vector.c
int a, b, c;
void f(void)
{
for(; b; b++)
for(c = 0; c < 2; c++)
a /= 5;
}
$ xgcc -O1 -ftree-vectorize -w vector.c
vector.c: In function ‘f’:
vector.c:3:6: internal compiler error: in vectorizable_reduction, at
tree-vect-loop.c:4633
void f(void)
^
linux-vdso.so.1: No such file or directory
0xa67b9c vectorizable_reduction(gimple_statement_d*, gimple_stmt_iterator*,
gimple_statement_d**, _slp_tree*)
../../srcdir/gcc/tree-vect-loop.c:4633
0xa58fa0 vect_analyze_stmt(gimple_statement_d*, bool*, _slp_tree*)
../../srcdir/gcc/tree-vect-stmts.c:5710
0xa58aca vect_analyze_stmt(gimple_statement_d*, bool*, _slp_tree*)
../../srcdir/gcc/tree-vect-stmts.c:5632
0xa6356d vect_analyze_loop_operations
../../srcdir/gcc/tree-vect-loop.c:1447
0xa6356d vect_analyze_loop_2
../../srcdir/gcc/tree-vect-loop.c:1725
0xa6356d vect_analyze_loop(loop*)
../../srcdir/gcc/tree-vect-loop.c:1778
0xa75f1c vectorize_loops()
../../srcdir/gcc/tree-vectorizer.c:114
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/55110] Internal compiler error in vectorizable_reduction, at tree-vect-loop.c:4633
2012-10-28 17:37 [Bug tree-optimization/55110] New: Internal compiler error in vectorizable_reduction, at tree-vect-loop.c:4633 antoine.balestrat at gmail dot com
@ 2012-10-29 12:14 ` mpolacek at gcc dot gnu.org
2012-10-29 14:45 ` [Bug tree-optimization/55110] [4.8 Regression] " rguenth at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2012-10-29 12:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55110
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-10-29
CC| |mpolacek at gcc dot
| |gnu.org, rth at gcc dot
| |gnu.org
Ever Confirmed|0 |1
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> 2012-10-29 12:14:19 UTC ---
Started with http://gcc.gnu.org/viewcvs?view=revision&revision=189006
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/55110] [4.8 Regression] Internal compiler error in vectorizable_reduction, at tree-vect-loop.c:4633
2012-10-28 17:37 [Bug tree-optimization/55110] New: Internal compiler error in vectorizable_reduction, at tree-vect-loop.c:4633 antoine.balestrat at gmail dot com
2012-10-29 12:14 ` [Bug tree-optimization/55110] " mpolacek at gcc dot gnu.org
@ 2012-10-29 14:45 ` rguenth at gcc dot gnu.org
2012-11-01 1:31 ` rth at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-10-29 14:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55110
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.8.0
Summary|Internal compiler error in |[4.8 Regression] Internal
|vectorizable_reduction, at |compiler error in
|tree-vect-loop.c:4633 |vectorizable_reduction, at
| |tree-vect-loop.c:4633
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/55110] [4.8 Regression] Internal compiler error in vectorizable_reduction, at tree-vect-loop.c:4633
2012-10-28 17:37 [Bug tree-optimization/55110] New: Internal compiler error in vectorizable_reduction, at tree-vect-loop.c:4633 antoine.balestrat at gmail dot com
2012-10-29 12:14 ` [Bug tree-optimization/55110] " mpolacek at gcc dot gnu.org
2012-10-29 14:45 ` [Bug tree-optimization/55110] [4.8 Regression] " rguenth at gcc dot gnu.org
@ 2012-11-01 1:31 ` rth at gcc dot gnu.org
2012-11-26 10:36 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rth at gcc dot gnu.org @ 2012-11-01 1:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55110
Richard Henderson <rth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |rth at gcc dot gnu.org
|gnu.org |
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/55110] [4.8 Regression] Internal compiler error in vectorizable_reduction, at tree-vect-loop.c:4633
2012-10-28 17:37 [Bug tree-optimization/55110] New: Internal compiler error in vectorizable_reduction, at tree-vect-loop.c:4633 antoine.balestrat at gmail dot com
` (2 preceding siblings ...)
2012-11-01 1:31 ` rth at gcc dot gnu.org
@ 2012-11-26 10:36 ` jakub at gcc dot gnu.org
2012-11-27 13:34 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-26 10:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55110
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-26 10:35:44 UTC ---
I'd say either we should nuke the bogus
gcc_assert (STMT_VINFO_RELATED_STMT (orig_stmt_info) == stmt);
assertion, which predates the introduction of
STMT_VINFO_PATTERN_DEF_STMT (and later STMT_VINFO_PATTERN_DEF_SEQ) - both in
4.7 cycle, or just return false; if it isn't equal.
We won't successfully vectorize this anyway, orig_code is still TRUNC_DIV_EXPR
and that is not a handled reduction (and even if we'd handled it as the signed
MULT_HIGHPART_EXPR reduction, that isn't handled either).
So, I'd propose this (if we wanted to assert something, it would need to
walk the STMT_VINFO_PATTERN_DEF_SEQ sequence and checking whether stmt isn't in
there too):
2012-11-26 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/55110
* tree-vect-loop.c (vectorizable_reduction): Don't assert
that STMT_VINFO_RELATED_STMT of orig_stmt is stmt.
* gcc.dg/pr55110.c: New test.
--- gcc/tree-vect-loop.c.jj 2012-11-21 16:00:12.000000000 +0100
+++ gcc/tree-vect-loop.c 2012-11-26 11:24:42.903995009 +0100
@@ -4624,7 +4624,6 @@ vectorizable_reduction (gimple stmt, gim
if (orig_stmt)
{
orig_stmt_info = vinfo_for_stmt (orig_stmt);
- gcc_assert (STMT_VINFO_RELATED_STMT (orig_stmt_info) == stmt);
gcc_assert (STMT_VINFO_IN_PATTERN_P (orig_stmt_info));
gcc_assert (!STMT_VINFO_IN_PATTERN_P (stmt_info));
}
--- gcc/testsuite/gcc.dg/pr55110.c.jj 2012-11-26 11:31:32.008587313 +0100
+++ gcc/testsuite/gcc.dg/pr55110.c 2012-11-26 11:31:09.000000000 +0100
@@ -0,0 +1,13 @@
+/* PR tree-optimization/55110 */
+/* { dg-do compile } */
+/* { dg-options "-O1 -ftree-vectorize" } */
+
+int
+foo (int x)
+{
+ int a, b;
+ for (b = 0; b < 8; b++)
+ for (a = 0; a < 2; a++)
+ x /= 3;
+ return x;
+}
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/55110] [4.8 Regression] Internal compiler error in vectorizable_reduction, at tree-vect-loop.c:4633
2012-10-28 17:37 [Bug tree-optimization/55110] New: Internal compiler error in vectorizable_reduction, at tree-vect-loop.c:4633 antoine.balestrat at gmail dot com
` (3 preceding siblings ...)
2012-11-26 10:36 ` jakub at gcc dot gnu.org
@ 2012-11-27 13:34 ` jakub at gcc dot gnu.org
2012-11-27 13:40 ` jakub at gcc dot gnu.org
2013-02-19 17:16 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-27 13:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55110
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-27 13:34:19 UTC ---
Author: jakub
Date: Tue Nov 27 13:34:11 2012
New Revision: 193845
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193845
Log:
PR tree-optimization/55110
* tree-vect-loop.c (vectorizable_reduction): Don't assert
that STMT_VINFO_RELATED_STMT of orig_stmt is stmt.
* gcc.dg/pr55110.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/pr55110.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-loop.c
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/55110] [4.8 Regression] Internal compiler error in vectorizable_reduction, at tree-vect-loop.c:4633
2012-10-28 17:37 [Bug tree-optimization/55110] New: Internal compiler error in vectorizable_reduction, at tree-vect-loop.c:4633 antoine.balestrat at gmail dot com
` (4 preceding siblings ...)
2012-11-27 13:34 ` jakub at gcc dot gnu.org
@ 2012-11-27 13:40 ` jakub at gcc dot gnu.org
2013-02-19 17:16 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-11-27 13:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55110
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-11-27 13:39:53 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/55110] [4.8 Regression] Internal compiler error in vectorizable_reduction, at tree-vect-loop.c:4633
2012-10-28 17:37 [Bug tree-optimization/55110] New: Internal compiler error in vectorizable_reduction, at tree-vect-loop.c:4633 antoine.balestrat at gmail dot com
` (5 preceding siblings ...)
2012-11-27 13:40 ` jakub at gcc dot gnu.org
@ 2013-02-19 17:16 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-02-19 17:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55110
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-02-19 17:16:02 UTC ---
Author: jakub
Date: Tue Feb 19 17:15:53 2013
New Revision: 196140
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=196140
Log:
Backported from mainline
2012-11-27 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/55110
* tree-vect-loop.c (vectorizable_reduction): Don't assert
that STMT_VINFO_RELATED_STMT of orig_stmt is stmt.
* gcc.dg/pr55110.c: New test.
Added:
branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/pr55110.c
Modified:
branches/gcc-4_7-branch/gcc/ChangeLog
branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
branches/gcc-4_7-branch/gcc/tree-vect-loop.c
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-02-19 17:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-28 17:37 [Bug tree-optimization/55110] New: Internal compiler error in vectorizable_reduction, at tree-vect-loop.c:4633 antoine.balestrat at gmail dot com
2012-10-29 12:14 ` [Bug tree-optimization/55110] " mpolacek at gcc dot gnu.org
2012-10-29 14:45 ` [Bug tree-optimization/55110] [4.8 Regression] " rguenth at gcc dot gnu.org
2012-11-01 1:31 ` rth at gcc dot gnu.org
2012-11-26 10:36 ` jakub at gcc dot gnu.org
2012-11-27 13:34 ` jakub at gcc dot gnu.org
2012-11-27 13:40 ` jakub at gcc dot gnu.org
2013-02-19 17:16 ` jakub 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).