public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/37574] New: [4.4 Regression] ICE with the vectorizer and GC
@ 2008-09-18 19:10 pinskia at gcc dot gnu dot org
2008-09-18 19:10 ` [Bug tree-optimization/37574] " pinskia at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-18 19:10 UTC (permalink / raw)
To: gcc-bugs
I noticed this while working on a rs6000 back-end patch and was questioning how
I could have caused this failure and then I noticed it was a GC issue and could
be reproduced without my patch.
Anyways here is the testcase reduced from vect-outer-4m.c:
unsigned short in[40 +128];
int main (void) {
int i = 0, j = 0;
unsigned int diff;
unsigned int s=0,sum=0;
for (i = 0; i < 40;i++)
{
diff = 0;
for (j = 0; j < 128;j+=8)
diff += in[j+i];
s += ((unsigned short)diff>>3);
}
if (s != sum)
abort ();
}
--- CUT ---
Compile with -O2 -ftree-vectorize --param ggc-min-expand=0 --param
ggc-min-heapsize=0 -maltivec to reproduce the bug.
--
Summary: [4.4 Regression] ICE with the vectorizer and GC
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, GC
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37574
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/37574] [4.4 Regression] ICE with the vectorizer and GC
2008-09-18 19:10 [Bug tree-optimization/37574] New: [4.4 Regression] ICE with the vectorizer and GC pinskia at gcc dot gnu dot org
@ 2008-09-18 19:10 ` pinskia at gcc dot gnu dot org
2008-09-19 14:00 ` jakub at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-18 19:10 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37574
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/37574] [4.4 Regression] ICE with the vectorizer and GC
2008-09-18 19:10 [Bug tree-optimization/37574] New: [4.4 Regression] ICE with the vectorizer and GC pinskia at gcc dot gnu dot org
2008-09-18 19:10 ` [Bug tree-optimization/37574] " pinskia at gcc dot gnu dot org
@ 2008-09-19 14:00 ` jakub at gcc dot gnu dot org
2008-09-19 14:14 ` jakub at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-09-19 14:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from jakub at gcc dot gnu dot org 2008-09-19 13:58 -------
The problem is const_vector_from_tree called on:
<vector_cst 0x7ffff3375e10
type <vector_type 0x7ffff33ed540 __vector signed int
type <integer_type 0x7ffff332d540 int sizes-gimplified public SI
size <integer_cst 0x7ffff3319930 constant 32>
unit size <integer_cst 0x7ffff33195a0 constant 4>
align 32 symtab 0 alias set -1 canonical type 0x7ffff332d540
precision 32 min <integer_cst 0x7ffff33198a0 -2147483648> max <integer_cst
0x7ffff33198d0 2147483647>
pointer_to_this <pointer_type 0x7ffff333c9c0>>
V4SI
size <integer_cst 0x7ffff3319c90 constant 128>
unit size <integer_cst 0x7ffff3319cc0 constant 16>
align 128 symtab 0 alias set -1 canonical type 0x7ffff33ed540 nunits 4>
constant
elt0: <integer_cst 0x7ffff3352570 type <integer_type 0x7ffff332d540 int>
constant 3> elt1: <integer_cst 0x7ffff3352570 3> elt2: <integer_cst
0x7ffff3352570 3> elt3: <integer_cst 0x7ffff3352570 3> elt4: <integer_cst
0x7ffff3352570 3> elt5: <integer_cst 0x7ffff3352570 3> elt6: <integer_cst
0x7ffff3352570 3> elt7: <integer_cst 0x7ffff3352570 3>>
Note V4SImode, yet 8 elements. This allocates a vector with rtvec_alloc (4),
yet fills in 8 elements. Looking what creates it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37574
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/37574] [4.4 Regression] ICE with the vectorizer and GC
2008-09-18 19:10 [Bug tree-optimization/37574] New: [4.4 Regression] ICE with the vectorizer and GC pinskia at gcc dot gnu dot org
2008-09-18 19:10 ` [Bug tree-optimization/37574] " pinskia at gcc dot gnu dot org
2008-09-19 14:00 ` jakub at gcc dot gnu dot org
@ 2008-09-19 14:14 ` jakub at gcc dot gnu dot org
2008-09-21 13:19 ` dorit at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-09-19 14:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jakub at gcc dot gnu dot org 2008-09-19 14:12 -------
vect_get_vec_def_for_operand has:
tree vectype = STMT_VINFO_VECTYPE (stmt_vinfo);
int nunits = TYPE_VECTOR_SUBPARTS (vectype);
...
/* Case 1: operand is a constant. */
case vect_constant_def:
...
for (i = nunits - 1; i >= 0; --i)
{
t = tree_cons (NULL_TREE, op, t);
}
vector_type = get_vectype_for_scalar_type (TREE_TYPE (op));
gcc_assert (vector_type);
vec_cst = build_vector (vector_type, t);
and similarly in a few other cases. vectype in this case is V8HI, but op is
SImode, so nunits is 8, yet vector_type has just 4 units.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |irar at gcc dot gnu dot org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-09-19 14:12:43
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37574
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/37574] [4.4 Regression] ICE with the vectorizer and GC
2008-09-18 19:10 [Bug tree-optimization/37574] New: [4.4 Regression] ICE with the vectorizer and GC pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-09-21 13:19 ` dorit at gcc dot gnu dot org
@ 2008-09-21 13:19 ` dorit at gcc dot gnu dot org
2008-09-26 6:30 ` dorit at gcc dot gnu dot org
2008-09-29 22:47 ` jakub at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: dorit at gcc dot gnu dot org @ 2008-09-21 13:19 UTC (permalink / raw)
To: gcc-bugs
--
dorit at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |dorit at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2008-09-19 14:12:43 |2008-09-21 13:17:55
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37574
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/37574] [4.4 Regression] ICE with the vectorizer and GC
2008-09-18 19:10 [Bug tree-optimization/37574] New: [4.4 Regression] ICE with the vectorizer and GC pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-09-19 14:14 ` jakub at gcc dot gnu dot org
@ 2008-09-21 13:19 ` dorit at gcc dot gnu dot org
2008-09-21 13:19 ` dorit at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: dorit at gcc dot gnu dot org @ 2008-09-21 13:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dorit at gcc dot gnu dot org 2008-09-21 13:18 -------
happens during outer-loop vectorization. I'm looking into it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37574
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/37574] [4.4 Regression] ICE with the vectorizer and GC
2008-09-18 19:10 [Bug tree-optimization/37574] New: [4.4 Regression] ICE with the vectorizer and GC pinskia at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-09-21 13:19 ` dorit at gcc dot gnu dot org
@ 2008-09-26 6:30 ` dorit at gcc dot gnu dot org
2008-09-29 22:47 ` jakub at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: dorit at gcc dot gnu dot org @ 2008-09-26 6:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dorit at gcc dot gnu dot org 2008-09-26 06:29 -------
Subject: Bug 37574
Author: dorit
Date: Fri Sep 26 06:28:01 2008
New Revision: 140685
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=140685
Log:
PR tree-optimization/37574
* tree-vectorizer.c (vect_is_simple_use): Fix indentation.
* tree-vect-transform.c (vect_get_constant_vectors): Use vectype
instead of vector_type for constants. Take computation out of loop.
(vect_get_vec_def_for_operand): Use only vectype for constant case,
and use only vector_type for invariant case.
(get_initial_def_for_reduction): Use vectype instead of vector_type.
Added:
trunk/gcc/testsuite/gcc.dg/vect/ggc-pr37574.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/vect/vect.exp
trunk/gcc/tree-vect-transform.c
trunk/gcc/tree-vectorizer.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37574
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/37574] [4.4 Regression] ICE with the vectorizer and GC
2008-09-18 19:10 [Bug tree-optimization/37574] New: [4.4 Regression] ICE with the vectorizer and GC pinskia at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-09-26 6:30 ` dorit at gcc dot gnu dot org
@ 2008-09-29 22:47 ` jakub at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-09-29 22:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jakub at gcc dot gnu dot org 2008-09-29 22:46 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37574
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2008-09-29 22:47 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-18 19:10 [Bug tree-optimization/37574] New: [4.4 Regression] ICE with the vectorizer and GC pinskia at gcc dot gnu dot org
2008-09-18 19:10 ` [Bug tree-optimization/37574] " pinskia at gcc dot gnu dot org
2008-09-19 14:00 ` jakub at gcc dot gnu dot org
2008-09-19 14:14 ` jakub at gcc dot gnu dot org
2008-09-21 13:19 ` dorit at gcc dot gnu dot org
2008-09-21 13:19 ` dorit at gcc dot gnu dot org
2008-09-26 6:30 ` dorit at gcc dot gnu dot org
2008-09-29 22:47 ` jakub at gcc dot gnu dot 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).