public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/44507] New: vectorization ANDs array elements together incorrectly
@ 2010-06-12 1:01 Daniel dot Davies at xerox dot com
2010-06-12 1:02 ` [Bug middle-end/44507] " pinskia at gcc dot gnu dot org
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: Daniel dot Davies at xerox dot com @ 2010-06-12 1:01 UTC (permalink / raw)
To: gcc-bugs
When the enclosed test case is compiled with -O3, the vectorization code loads
and SSE register with 0x00000001000000010000000100000001 instead of
0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF, then ANDs this with elements of the array.
This causes the code to fail.
--
Summary: vectorization ANDs array elements together incorrectly
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: Daniel dot Davies at xerox dot com
GCC build triplet: i386-pc-solaris2.10
GCC host triplet: i386-pc-solaris2.10
GCC target triplet: i386-pc-solaris2.10
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44507
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/44507] vectorization ANDs array elements together incorrectly
2010-06-12 1:01 [Bug c/44507] New: vectorization ANDs array elements together incorrectly Daniel dot Davies at xerox dot com
@ 2010-06-12 1:02 ` pinskia at gcc dot gnu dot org
2010-06-12 1:03 ` Daniel dot Davies at xerox dot com
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-06-12 1:02 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44507
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/44507] vectorization ANDs array elements together incorrectly
2010-06-12 1:01 [Bug c/44507] New: vectorization ANDs array elements together incorrectly Daniel dot Davies at xerox dot com
2010-06-12 1:02 ` [Bug middle-end/44507] " pinskia at gcc dot gnu dot org
@ 2010-06-12 1:03 ` Daniel dot Davies at xerox dot com
2010-06-12 1:05 ` Daniel dot Davies at xerox dot com
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Daniel dot Davies at xerox dot com @ 2010-06-12 1:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from Daniel dot Davies at xerox dot com 2010-06-12 01:02 -------
Created an attachment (id=20900)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20900&action=view)
The preprocessed test case.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44507
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug middle-end/44507] vectorization ANDs array elements together incorrectly
2010-06-12 1:01 [Bug c/44507] New: vectorization ANDs array elements together incorrectly Daniel dot Davies at xerox dot com
2010-06-12 1:02 ` [Bug middle-end/44507] " pinskia at gcc dot gnu dot org
2010-06-12 1:03 ` Daniel dot Davies at xerox dot com
@ 2010-06-12 1:05 ` Daniel dot Davies at xerox dot com
2010-06-12 8:42 ` [Bug tree-optimization/44507] [4.5/4.6 Regression] " rguenth at gcc dot gnu dot org
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Daniel dot Davies at xerox dot com @ 2010-06-12 1:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from Daniel dot Davies at xerox dot com 2010-06-12 01:04 -------
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/tool/gcc/4.5.0/i386-pc-solaris2.10/libexec/gcc/i386-pc-solaris2.10/4.5.0/lto-wrapper
Target: i386-pc-solaris2.10
Configured with: /tool/gcc/4.5.0/gcc-4.5.0/configure
--prefix=/tool/gcc/4.5.0/i386-pc-solaris2.10 --with-gnu-as --with-gnu-ld
--disable-shared --enable-lto --with-libelf=/usr/local --enable-gold
Thread model: posix
gcc version 4.5.0 (GCC)
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=gnu99' '-march=core2' '-pedantic'
'-Wall' '-W' '-Wstrict-prototypes' '-Wpointer-arith' '-Wwrite-strings'
'-Wcast-qual' '-Wmissing-prototypes' '-fPIC'
/tool/gcc/4.5.0/i386-pc-solaris2.10/libexec/gcc/i386-pc-solaris2.10/4.5.0/cc1
-E -quiet -v gcc450VectBug.c -march=core2 -std=gnu99 -pedantic -Wall -W
-Wstrict-prototypes -Wpointer-arith -Wwrite-strings -Wcast-qual
-Wmissing-prototypes -fPIC -fpch-preprocess -o gcc450VectBug.i
ignoring nonexistent directory
"/tool/gcc/4.5.0/i386-pc-solaris2.10/lib/gcc/i386-pc-solaris2.10/4.5.0/../../../../i386-pc-solaris2.10/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include
/tool/gcc/4.5.0/i386-pc-solaris2.10/include
/tool/gcc/4.5.0/i386-pc-solaris2.10/lib/gcc/i386-pc-solaris2.10/4.5.0/include
/tool/gcc/4.5.0/i386-pc-solaris2.10/lib/gcc/i386-pc-solaris2.10/4.5.0/include-fixed
/usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=gnu99' '-march=core2' '-pedantic'
'-Wall' '-W' '-Wstrict-prototypes' '-Wpointer-arith' '-Wwrite-strings'
'-Wcast-qual' '-Wmissing-prototypes' '-fPIC'
/tool/gcc/4.5.0/i386-pc-solaris2.10/libexec/gcc/i386-pc-solaris2.10/4.5.0/cc1
-fpreprocessed gcc450VectBug.i -quiet -dumpbase gcc450VectBug.c -march=core2
-auxbase gcc450VectBug -pedantic -Wall -W -Wstrict-prototypes -Wpointer-arith
-Wwrite-strings -Wcast-qual -Wmissing-prototypes -std=gnu99 -version -fPIC -o
gcc450VectBug.s
GNU C (GCC) version 4.5.0 (i386-pc-solaris2.10)
compiled by GNU C version 4.5.0, GMP version 4.3.2, MPFR version 2.4.2,
MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C (GCC) version 4.5.0 (i386-pc-solaris2.10)
compiled by GNU C version 4.5.0, GMP version 4.3.2, MPFR version 2.4.2,
MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: cf0046f5352e75464cfcf0489db9539c
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=gnu99' '-march=core2' '-pedantic'
'-Wall' '-W' '-Wstrict-prototypes' '-Wpointer-arith' '-Wwrite-strings'
'-Wcast-qual' '-Wmissing-prototypes' '-fPIC'
/tool/gcc/4.5.0/i386-pc-solaris2.10/lib/gcc/i386-pc-solaris2.10/4.5.0/../../../../i386-pc-solaris2.10/bin/as
-v -V -Qy -s -o gcc450VectBug.o gcc450VectBug.s
GNU assembler version 2.20 (i386-pc-solaris2.10) using BFD version (GNU
Binutils) 2.20
COMPILER_PATH=/tool/gcc/4.5.0/i386-pc-solaris2.10/libexec/gcc/i386-pc-solaris2.10/4.5.0/:/tool/gcc/4.5.0/i386-pc-solaris2.10/libexec/gcc/i386-pc-solaris2.10/4.5.0/:/tool/gcc/4.5.0/i386-pc-solaris2.10/libexec/gcc/i386-pc-solaris2.10/:/tool/gcc/4.5.0/i386-pc-solaris2.10/lib/gcc/i386-pc-solaris2.10/4.5.0/:/tool/gcc/4.5.0/i386-pc-solaris2.10/lib/gcc/i386-pc-solaris2.10/:/tool/gcc/4.5.0/i386-pc-solaris2.10/lib/gcc/i386-pc-solaris2.10/4.5.0/../../../../i386-pc-solaris2.10/bin/:/usr/ccs/bin/
LIBRARY_PATH=/tool/gcc/4.5.0/i386-pc-solaris2.10/lib/gcc/i386-pc-solaris2.10/4.5.0/:/tool/gcc/4.5.0/i386-pc-solaris2.10/lib/gcc/i386-pc-solaris2.10/4.5.0/../../../../i386-pc-solaris2.10/lib/:/tool/gcc/4.5.0/i386-pc-solaris2.10/lib/gcc/i386-pc-solaris2.10/4.5.0/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=gnu99' '-march=core2' '-pedantic'
'-Wall' '-W' '-Wstrict-prototypes' '-Wpointer-arith' '-Wwrite-strings'
'-Wcast-qual' '-Wmissing-prototypes' '-fPIC'
/tool/gcc/4.5.0/i386-pc-solaris2.10/libexec/gcc/i386-pc-solaris2.10/4.5.0/collect2
-V -m elf_i386 -Y P,/usr/ccs/lib:/usr/lib -Qy /usr/lib/crt1.o /usr/lib/crti.o
/usr/lib/values-Xa.o
/tool/gcc/4.5.0/i386-pc-solaris2.10/lib/gcc/i386-pc-solaris2.10/4.5.0/crtbegin.o
-L/tool/gcc/4.5.0/i386-pc-solaris2.10/lib/gcc/i386-pc-solaris2.10/4.5.0
-L/tool/gcc/4.5.0/i386-pc-solaris2.10/lib/gcc/i386-pc-solaris2.10/4.5.0/../../../../i386-pc-solaris2.10/lib
-L/tool/gcc/4.5.0/i386-pc-solaris2.10/lib/gcc/i386-pc-solaris2.10/4.5.0/../../..
gcc450VectBug.o -lgcc -lc -lgcc
/tool/gcc/4.5.0/i386-pc-solaris2.10/lib/gcc/i386-pc-solaris2.10/4.5.0/crtend.o
/usr/lib/crtn.o
GNU ld (GNU Binutils) 2.20
Supported emulations:
elf_i386_ldso
elf_i386
elf_x86_64
elf_l1om
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44507
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/44507] [4.5/4.6 Regression] vectorization ANDs array elements together incorrectly
2010-06-12 1:01 [Bug c/44507] New: vectorization ANDs array elements together incorrectly Daniel dot Davies at xerox dot com
` (2 preceding siblings ...)
2010-06-12 1:05 ` Daniel dot Davies at xerox dot com
@ 2010-06-12 8:42 ` rguenth at gcc dot gnu dot org
2010-06-12 15:52 ` hjl dot tools at gmail dot com
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-12 8:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2010-06-12 08:42 -------
Confirmed.
The vectorizer changes
# andVal_34 = PHI <andVal_15(5), 0x0ffffffff(3)>
andVal_15 = curVal_13 & andVal_34;
to
# vect_var_.26_52 = PHI <vect_var_.26_53(5), { 1, 1, 1, 1 }(3)>
vect_var_.26_53 = vect_var_.21_42 & vect_var_.26_52;
4.4 works.
--
rguenth 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
Known to work| |4.4.3
Last reconfirmed|0000-00-00 00:00:00 |2010-06-12 08:42:01
date| |
Summary|vectorization ANDs array |[4.5/4.6 Regression]
|elements together |vectorization ANDs array
|incorrectly |elements together
| |incorrectly
Target Milestone|--- |4.5.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44507
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/44507] [4.5/4.6 Regression] vectorization ANDs array elements together incorrectly
2010-06-12 1:01 [Bug c/44507] New: vectorization ANDs array elements together incorrectly Daniel dot Davies at xerox dot com
` (3 preceding siblings ...)
2010-06-12 8:42 ` [Bug tree-optimization/44507] [4.5/4.6 Regression] " rguenth at gcc dot gnu dot org
@ 2010-06-12 15:52 ` hjl dot tools at gmail dot com
2010-06-13 10:29 ` irar at il dot ibm dot com
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-06-12 15:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from hjl dot tools at gmail dot com 2010-06-12 15:52 -------
It is caused by revision 149526:
http://gcc.gnu.org/ml/gcc-cvs/2009-07/msg00406.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44507
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/44507] [4.5/4.6 Regression] vectorization ANDs array elements together incorrectly
2010-06-12 1:01 [Bug c/44507] New: vectorization ANDs array elements together incorrectly Daniel dot Davies at xerox dot com
` (4 preceding siblings ...)
2010-06-12 15:52 ` hjl dot tools at gmail dot com
@ 2010-06-13 10:29 ` irar at il dot ibm dot com
2010-06-13 11:35 ` rguenth at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: irar at il dot ibm dot com @ 2010-06-13 10:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from irar at il dot ibm dot com 2010-06-13 10:29 -------
The bug is in creation of a neutral value for BIT_AND_EXPR. What is the correct
way to create it for all types? I found
double-int.h:#define ALL_ONES (~((unsigned HOST_WIDE_INT) 0))
but it won't work for signed.
Thanks,
Ira
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44507
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/44507] [4.5/4.6 Regression] vectorization ANDs array elements together incorrectly
2010-06-12 1:01 [Bug c/44507] New: vectorization ANDs array elements together incorrectly Daniel dot Davies at xerox dot com
` (5 preceding siblings ...)
2010-06-13 10:29 ` irar at il dot ibm dot com
@ 2010-06-13 11:35 ` rguenth at gcc dot gnu dot org
2010-06-13 12:02 ` irar at il dot ibm dot com
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-13 11:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from rguenth at gcc dot gnu dot org 2010-06-13 11:35 -------
(In reply to comment #5)
> The bug is in creation of a neutral value for BIT_AND_EXPR. What is the correct
> way to create it for all types? I found
> double-int.h:#define ALL_ONES (~((unsigned HOST_WIDE_INT) 0))
> but it won't work for signed.
build_int_cst (type, -1)
At least in tree-vect-slp.c:1669 this seems to be buggy. The
case for BIT_AND_EXPR should be separated from that of MULT_EXPR.
> Thanks,
> Ira
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44507
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/44507] [4.5/4.6 Regression] vectorization ANDs array elements together incorrectly
2010-06-12 1:01 [Bug c/44507] New: vectorization ANDs array elements together incorrectly Daniel dot Davies at xerox dot com
` (6 preceding siblings ...)
2010-06-13 11:35 ` rguenth at gcc dot gnu dot org
@ 2010-06-13 12:02 ` irar at il dot ibm dot com
2010-06-13 12:25 ` rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: irar at il dot ibm dot com @ 2010-06-13 12:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from irar at il dot ibm dot com 2010-06-13 12:01 -------
(In reply to comment #6)
> (In reply to comment #5)
> > The bug is in creation of a neutral value for BIT_AND_EXPR. What is the correct
> > way to create it for all types? I found
> > double-int.h:#define ALL_ONES (~((unsigned HOST_WIDE_INT) 0))
> > but it won't work for signed.
>
> build_int_cst (type, -1)
OK, thanks.
>
> At least in tree-vect-slp.c:1669 this seems to be buggy. The
> case for BIT_AND_EXPR should be separated from that of MULT_EXPR.
Right, this is buggy too, but the failure here is in reduction
(get_initial_def_for_reduction), not in SLP.
Is it safe to assume that operands of BIT_AND_EXPR are of integral type? If so,
I'll test the following patch:
Index: tree-vect-loop.c
===================================================================
--- tree-vect-loop.c (revision 160524)
+++ tree-vect-loop.c (working copy)
@@ -2871,12 +2871,15 @@ get_initial_def_for_reduction (gimple st
*adjustment_def = init_val;
}
- if (code == MULT_EXPR || code == BIT_AND_EXPR)
+ if (code == MULT_EXPR)
{
real_init_val = dconst1;
int_init_val = 1;
}
+ if (code == BIT_AND_EXPR)
+ int_init_val = -1;
+
if (SCALAR_FLOAT_TYPE_P (scalar_type))
def_for_init = build_real (scalar_type, real_init_val);
else
Index: tree-vect-slp.c
===================================================================
--- tree-vect-slp.c (revision 160524)
+++ tree-vect-slp.c (working copy)
@@ -1662,7 +1662,6 @@ vect_get_constant_vectors (slp_tree slp_
break;
case MULT_EXPR:
- case BIT_AND_EXPR:
if (SCALAR_FLOAT_TYPE_P (TREE_TYPE (op)))
neutral_op = build_real (TREE_TYPE (op), dconst1);
else
@@ -1670,6 +1669,10 @@ vect_get_constant_vectors (slp_tree slp_
break;
+ case BIT_AND_EXPR:
+ neutral_op = build_int_cst (TREE_TYPE (op), -1);
+ break;
+
default:
neutral_op = NULL;
}
Thanks,
Ira
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44507
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/44507] [4.5/4.6 Regression] vectorization ANDs array elements together incorrectly
2010-06-12 1:01 [Bug c/44507] New: vectorization ANDs array elements together incorrectly Daniel dot Davies at xerox dot com
` (7 preceding siblings ...)
2010-06-13 12:02 ` irar at il dot ibm dot com
@ 2010-06-13 12:25 ` rguenth at gcc dot gnu dot org
2010-06-14 12:23 ` irar at gcc dot gnu dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-13 12:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenth at gcc dot gnu dot org 2010-06-13 12:25 -------
(In reply to comment #7)
> (In reply to comment #6)
> > (In reply to comment #5)
> > > The bug is in creation of a neutral value for BIT_AND_EXPR. What is the correct
> > > way to create it for all types? I found
> > > double-int.h:#define ALL_ONES (~((unsigned HOST_WIDE_INT) 0))
> > > but it won't work for signed.
> >
> > build_int_cst (type, -1)
>
> OK, thanks.
>
> >
> > At least in tree-vect-slp.c:1669 this seems to be buggy. The
> > case for BIT_AND_EXPR should be separated from that of MULT_EXPR.
>
> Right, this is buggy too, but the failure here is in reduction
> (get_initial_def_for_reduction), not in SLP.
>
> Is it safe to assume that operands of BIT_AND_EXPR are of integral type?
Yes, I think so (vector types are ok as well, but we don't vectorize with
vector types around, maybe fixed-point types are ok as well, but we
have no vector modes for them)
> If so,
> I'll test the following patch:
>
> Index: tree-vect-loop.c
> ===================================================================
> --- tree-vect-loop.c (revision 160524)
> +++ tree-vect-loop.c (working copy)
> @@ -2871,12 +2871,15 @@ get_initial_def_for_reduction (gimple st
> *adjustment_def = init_val;
> }
>
> - if (code == MULT_EXPR || code == BIT_AND_EXPR)
> + if (code == MULT_EXPR)
> {
> real_init_val = dconst1;
> int_init_val = 1;
> }
>
> + if (code == BIT_AND_EXPR)
> + int_init_val = -1;
> +
> if (SCALAR_FLOAT_TYPE_P (scalar_type))
> def_for_init = build_real (scalar_type, real_init_val);
> else
> Index: tree-vect-slp.c
> ===================================================================
> --- tree-vect-slp.c (revision 160524)
> +++ tree-vect-slp.c (working copy)
> @@ -1662,7 +1662,6 @@ vect_get_constant_vectors (slp_tree slp_
> break;
>
> case MULT_EXPR:
> - case BIT_AND_EXPR:
> if (SCALAR_FLOAT_TYPE_P (TREE_TYPE (op)))
> neutral_op = build_real (TREE_TYPE (op), dconst1);
> else
> @@ -1670,6 +1669,10 @@ vect_get_constant_vectors (slp_tree slp_
>
> break;
>
> + case BIT_AND_EXPR:
> + neutral_op = build_int_cst (TREE_TYPE (op), -1);
> + break;
> +
> default:
> neutral_op = NULL;
> }
Looks good.
Thanks,
Richard.
> Thanks,
> Ira
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44507
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/44507] [4.5/4.6 Regression] vectorization ANDs array elements together incorrectly
2010-06-12 1:01 [Bug c/44507] New: vectorization ANDs array elements together incorrectly Daniel dot Davies at xerox dot com
` (8 preceding siblings ...)
2010-06-13 12:25 ` rguenth at gcc dot gnu dot org
@ 2010-06-14 12:23 ` irar at gcc dot gnu dot org
2010-06-14 13:43 ` irar at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: irar at gcc dot gnu dot org @ 2010-06-14 12:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from irar at gcc dot gnu dot org 2010-06-14 12:22 -------
Subject: Bug 44507
Author: irar
Date: Mon Jun 14 12:22:13 2010
New Revision: 160727
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160727
Log:
PR tree-optimization/44507
* tree-vect-loop.c (get_initial_def_for_reduction): Use -1
to build initial vector for BIT_AND_EXPR.
* tree-vect-slp.c (vect_get_constant_vectors): Likewise.
Added:
trunk/gcc/testsuite/gcc.dg/vect/pr44507.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-vect-loop.c
trunk/gcc/tree-vect-slp.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44507
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/44507] [4.5/4.6 Regression] vectorization ANDs array elements together incorrectly
2010-06-12 1:01 [Bug c/44507] New: vectorization ANDs array elements together incorrectly Daniel dot Davies at xerox dot com
` (9 preceding siblings ...)
2010-06-14 12:23 ` irar at gcc dot gnu dot org
@ 2010-06-14 13:43 ` irar at gcc dot gnu dot org
2010-06-14 19:03 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: irar at gcc dot gnu dot org @ 2010-06-14 13:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from irar at gcc dot gnu dot org 2010-06-14 13:43 -------
Subject: Bug 44507
Author: irar
Date: Mon Jun 14 13:43:24 2010
New Revision: 160742
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160742
Log:
PR tree-optimization/44507
* tree-vect-loop.c (get_initial_def_for_reduction): Use -1
to build initial vector for BIT_AND_EXPR.
Added:
branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/vect/pr44507.c
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
branches/gcc-4_5-branch/gcc/tree-vect-loop.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44507
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/44507] [4.5/4.6 Regression] vectorization ANDs array elements together incorrectly
2010-06-12 1:01 [Bug c/44507] New: vectorization ANDs array elements together incorrectly Daniel dot Davies at xerox dot com
` (10 preceding siblings ...)
2010-06-14 13:43 ` irar at gcc dot gnu dot org
@ 2010-06-14 19:03 ` rguenth at gcc dot gnu dot org
2010-06-16 3:14 ` amodra at gmail dot com
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-06-14 19:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from rguenth at gcc dot gnu dot org 2010-06-14 19:03 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Known to fail| |4.5.0
Known to work|4.4.3 |4.4.3 4.5.1
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44507
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/44507] [4.5/4.6 Regression] vectorization ANDs array elements together incorrectly
2010-06-12 1:01 [Bug c/44507] New: vectorization ANDs array elements together incorrectly Daniel dot Davies at xerox dot com
` (11 preceding siblings ...)
2010-06-14 19:03 ` rguenth at gcc dot gnu dot org
@ 2010-06-16 3:14 ` amodra at gmail dot com
2010-06-16 4:23 ` amodra at gcc dot gnu dot org
2010-06-16 4:23 ` amodra at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: amodra at gmail dot com @ 2010-06-16 3:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from amodra at gmail dot com 2010-06-16 03:14 -------
testsuite/gcc.dg/vect/pr44507.c is invalid on LP64. This:
curVal = *((unsigned long *)(&pArray[index]));
loads 8 bytes, ie. the last time around the loop this loads 4 bytes past the
end of the array. On big-endian machines this is the low 32 bits so the test
fails. The obvious fix is to replace the cast with (unsigned int *) and indeed
this makes the test pass on powerpc64.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44507
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/44507] [4.5/4.6 Regression] vectorization ANDs array elements together incorrectly
2010-06-12 1:01 [Bug c/44507] New: vectorization ANDs array elements together incorrectly Daniel dot Davies at xerox dot com
` (13 preceding siblings ...)
2010-06-16 4:23 ` amodra at gcc dot gnu dot org
@ 2010-06-16 4:23 ` amodra at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: amodra at gcc dot gnu dot org @ 2010-06-16 4:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from amodra at gcc dot gnu dot org 2010-06-16 04:22 -------
Subject: Bug 44507
Author: amodra
Date: Wed Jun 16 04:22:36 2010
New Revision: 160821
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160821
Log:
PR tree-optimization/44507
* gcc.dg/vect/pr44507.c (seeIf256ByteArrayIsConstant): Correct cast.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/vect/pr44507.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44507
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug tree-optimization/44507] [4.5/4.6 Regression] vectorization ANDs array elements together incorrectly
2010-06-12 1:01 [Bug c/44507] New: vectorization ANDs array elements together incorrectly Daniel dot Davies at xerox dot com
` (12 preceding siblings ...)
2010-06-16 3:14 ` amodra at gmail dot com
@ 2010-06-16 4:23 ` amodra at gcc dot gnu dot org
2010-06-16 4:23 ` amodra at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: amodra at gcc dot gnu dot org @ 2010-06-16 4:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from amodra at gcc dot gnu dot org 2010-06-16 04:23 -------
Subject: Bug 44507
Author: amodra
Date: Wed Jun 16 04:23:05 2010
New Revision: 160822
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=160822
Log:
PR tree-optimization/44507
* gcc.dg/vect/pr44507.c (seeIf256ByteArrayIsConstant): Correct cast.
Modified:
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/vect/pr44507.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44507
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2010-06-16 4:23 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-12 1:01 [Bug c/44507] New: vectorization ANDs array elements together incorrectly Daniel dot Davies at xerox dot com
2010-06-12 1:02 ` [Bug middle-end/44507] " pinskia at gcc dot gnu dot org
2010-06-12 1:03 ` Daniel dot Davies at xerox dot com
2010-06-12 1:05 ` Daniel dot Davies at xerox dot com
2010-06-12 8:42 ` [Bug tree-optimization/44507] [4.5/4.6 Regression] " rguenth at gcc dot gnu dot org
2010-06-12 15:52 ` hjl dot tools at gmail dot com
2010-06-13 10:29 ` irar at il dot ibm dot com
2010-06-13 11:35 ` rguenth at gcc dot gnu dot org
2010-06-13 12:02 ` irar at il dot ibm dot com
2010-06-13 12:25 ` rguenth at gcc dot gnu dot org
2010-06-14 12:23 ` irar at gcc dot gnu dot org
2010-06-14 13:43 ` irar at gcc dot gnu dot org
2010-06-14 19:03 ` rguenth at gcc dot gnu dot org
2010-06-16 3:14 ` amodra at gmail dot com
2010-06-16 4:23 ` amodra at gcc dot gnu dot org
2010-06-16 4:23 ` amodra 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).