public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/36493] New: [4.3/4.4 Regression] vectorizer aliasing bug
@ 2008-06-10 20:06 jsm28 at gcc dot gnu dot org
2008-06-11 8:01 ` [Bug tree-optimization/36493] " irar at il dot ibm dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-06-10 20:06 UTC (permalink / raw)
To: gcc-bugs
The following code aborts if built for i686-pc-linux-gnu with -msse2 -O3.
extern void abort (void);
int
main (void)
{
int i;
long x[12] __attribute__((aligned(16)));
x[0] = 1;
for (i = 0; i < 12; i++)
x[i] = i;
if (x[0] != 0)
abort ();
return 0;
}
The loop gets vectorized using "vector int *" pointers, and then the compiler
decides that "vector int" writes don't conflict with "long" reads. (If an
array of int is used instead, the test passes.)
(Not x86-specific; originally observed as a failure of
gcc.c-torture/execute/loop-13.c on SPE with an unsubmitted patch to support
autovectorization there.)
--
Summary: [4.3/4.4 Regression] vectorizer aliasing bug
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jsm28 at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36493
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/36493] [4.3/4.4 Regression] vectorizer aliasing bug
2008-06-10 20:06 [Bug tree-optimization/36493] New: [4.3/4.4 Regression] vectorizer aliasing bug jsm28 at gcc dot gnu dot org
@ 2008-06-11 8:01 ` irar at il dot ibm dot com
2008-06-11 8:37 ` rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: irar at il dot ibm dot com @ 2008-06-11 8:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from irar at il dot ibm dot com 2008-06-11 08:00 -------
Reproduced on powerpc64-suse-linux.
Doesn't occur when compiled with -O2 -ftree-vectorize instead of -O3 (the
vectorizer generates the same code in both cases).
--
irar at il dot ibm dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-06-11 08:00:41
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36493
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/36493] [4.3/4.4 Regression] vectorizer aliasing bug
2008-06-10 20:06 [Bug tree-optimization/36493] New: [4.3/4.4 Regression] vectorizer aliasing bug jsm28 at gcc dot gnu dot org
2008-06-11 8:01 ` [Bug tree-optimization/36493] " irar at il dot ibm dot com
@ 2008-06-11 8:37 ` rguenth at gcc dot gnu dot org
2008-06-11 11:16 ` jsm28 at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-06-11 8:37 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2008-06-11 08:37 -------
Vectors have the alias set of their element type and int and long do not have
conflicting alias sets. The vectorizer clearly should choose vector long *
instead of vector int *.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36493
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/36493] [4.3/4.4 Regression] vectorizer aliasing bug
2008-06-10 20:06 [Bug tree-optimization/36493] New: [4.3/4.4 Regression] vectorizer aliasing bug jsm28 at gcc dot gnu dot org
2008-06-11 8:01 ` [Bug tree-optimization/36493] " irar at il dot ibm dot com
2008-06-11 8:37 ` rguenth at gcc dot gnu dot org
@ 2008-06-11 11:16 ` jsm28 at gcc dot gnu dot org
2008-06-13 21:45 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-06-11 11:16 UTC (permalink / raw)
To: gcc-bugs
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.3.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36493
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/36493] [4.3/4.4 Regression] vectorizer aliasing bug
2008-06-10 20:06 [Bug tree-optimization/36493] New: [4.3/4.4 Regression] vectorizer aliasing bug jsm28 at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-06-11 11:16 ` jsm28 at gcc dot gnu dot org
@ 2008-06-13 21:45 ` mmitchel at gcc dot gnu dot org
2008-06-16 10:40 ` irar at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2008-06-13 21:45 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36493
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/36493] [4.3/4.4 Regression] vectorizer aliasing bug
2008-06-10 20:06 [Bug tree-optimization/36493] New: [4.3/4.4 Regression] vectorizer aliasing bug jsm28 at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-06-13 21:45 ` mmitchel at gcc dot gnu dot org
@ 2008-06-16 10:40 ` irar at gcc dot gnu dot org
2008-06-16 10:44 ` irar at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: irar at gcc dot gnu dot org @ 2008-06-16 10:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from irar at gcc dot gnu dot org 2008-06-16 10:39 -------
Subject: Bug 36493
Author: irar
Date: Mon Jun 16 10:39:07 2008
New Revision: 136843
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136843
Log:
PR tree-optimization/36493
* tree-vect-transform.c (vect_create_data_ref_ptr): Remove TYPE from
the arguments list. Use VECTYPE to create vector pointer.
(vectorizable_store): Fail if accesses through a pointer to vectype
do not alias the original memory reference operands.
Call vect_create_data_ref_ptr without the removed argument.
(vectorizable_load): Likewise.
(vect_setup_realignment): Call vect_create_data_ref_ptr without the
removed argument.
Added:
trunk/gcc/testsuite/gcc.dg/vect/pr36493.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-transform.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36493
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/36493] [4.3/4.4 Regression] vectorizer aliasing bug
2008-06-10 20:06 [Bug tree-optimization/36493] New: [4.3/4.4 Regression] vectorizer aliasing bug jsm28 at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-06-16 10:40 ` irar at gcc dot gnu dot org
@ 2008-06-16 10:44 ` irar at gcc dot gnu dot org
2008-06-17 11:50 ` irar at il dot ibm dot com
2008-12-28 1:17 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: irar at gcc dot gnu dot org @ 2008-06-16 10:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from irar at gcc dot gnu dot org 2008-06-16 10:43 -------
Subject: Bug 36493
Author: irar
Date: Mon Jun 16 10:42:56 2008
New Revision: 136844
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=136844
Log:
PR tree-optimization/36493
* tree-vect-transform.c (vect_create_data_ref_ptr): Remove TYPE from
the arguments list. Use VECTYPE to create vector pointer.
(vectorizable_store): Fail if accesses through a pointer to vectype
do not alias the original memory reference operands.
Call vect_create_data_ref_ptr without the removed argument.
(vectorizable_load): Likewise.
(vect_setup_realignment): Call vect_create_data_ref_ptr without the
removed argument.
Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/vect/pr36493.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
branches/gcc-4_3-branch/gcc/tree-vect-transform.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36493
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/36493] [4.3/4.4 Regression] vectorizer aliasing bug
2008-06-10 20:06 [Bug tree-optimization/36493] New: [4.3/4.4 Regression] vectorizer aliasing bug jsm28 at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-06-16 10:44 ` irar at gcc dot gnu dot org
@ 2008-06-17 11:50 ` irar at il dot ibm dot com
2008-12-28 1:17 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: irar at il dot ibm dot com @ 2008-06-17 11:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from irar at il dot ibm dot com 2008-06-17 11:49 -------
Fixed.
--
irar at il dot ibm dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Priority|P1 |P3
Resolution| |FIXED
Target Milestone|4.3.2 |---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36493
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/36493] [4.3/4.4 Regression] vectorizer aliasing bug
2008-06-10 20:06 [Bug tree-optimization/36493] New: [4.3/4.4 Regression] vectorizer aliasing bug jsm28 at gcc dot gnu dot org
` (6 preceding siblings ...)
2008-06-17 11:50 ` irar at il dot ibm dot com
@ 2008-12-28 1:17 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-28 1:17 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Target Milestone|--- |4.3.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36493
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-12-28 1:17 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-10 20:06 [Bug tree-optimization/36493] New: [4.3/4.4 Regression] vectorizer aliasing bug jsm28 at gcc dot gnu dot org
2008-06-11 8:01 ` [Bug tree-optimization/36493] " irar at il dot ibm dot com
2008-06-11 8:37 ` rguenth at gcc dot gnu dot org
2008-06-11 11:16 ` jsm28 at gcc dot gnu dot org
2008-06-13 21:45 ` mmitchel at gcc dot gnu dot org
2008-06-16 10:40 ` irar at gcc dot gnu dot org
2008-06-16 10:44 ` irar at gcc dot gnu dot org
2008-06-17 11:50 ` irar at il dot ibm dot com
2008-12-28 1:17 ` pinskia 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).