public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/57537] New: [4.8/4.9] gcc.dg/vect/slp-widen-mult-half.c generating wrong code on PowerPC64
@ 2013-06-05 20:43 brooks at gcc dot gnu.org
2013-06-06 10:44 ` [Bug tree-optimization/57537] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: brooks at gcc dot gnu.org @ 2013-06-05 20:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57537
Bug ID: 57537
Summary: [4.8/4.9] gcc.dg/vect/slp-widen-mult-half.c generating
wrong code on PowerPC64
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: brooks at gcc dot gnu.org
The gcc.dg/vect/slp-widen-mult-half.c test tests autovectorization of this
inner loop:
for (i = 0; i < N/2; i++)
{
out[2*i] = in[2*i] * COEF;
out2[2*i] = in[2*i] + COEF2;
out[2*i+1] = in[2*i+1] * COEF;
out2[2*i+1] = in[2*i+1] + COEF2;
}
The execution portion of this test is failing on AltiVec-enabled powerpc64
targets on both the 4.8 branch (which is essentially at the point of the 4.8.1
release at the point I tested it) and on trunk.
The symptoms appear to strongly indicate that this is a simple matter of wrong
code generation: the out[] array is zeroed out rather than having the correct
values assigned. The out2[] array is correct.
In case it helps someone, here is the line of instrumentation code that I added
to the test to investigate the computed values:
for (i = 0; i < N; i++)
printf("at %d: %d == %d, %d == %d\n", i, out[i], in[i] * COEF,
out2[i], in[i] + COEF2);
I also tried putting some nonzero initial values in out[] before the vectorized
loop; the output remains zero, so this is being actively zeroed out.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/57537] [4.8/4.9 Regression] gcc.dg/vect/slp-widen-mult-half.c generating wrong code on PowerPC64
2013-06-05 20:43 [Bug tree-optimization/57537] New: [4.8/4.9] gcc.dg/vect/slp-widen-mult-half.c generating wrong code on PowerPC64 brooks at gcc dot gnu.org
@ 2013-06-06 10:44 ` rguenth at gcc dot gnu.org
2013-06-12 7:58 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-06-06 10:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57537
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |wrong-code
Target Milestone|--- |4.8.2
Summary|[4.8/4.9] |[4.8/4.9 Regression]
|gcc.dg/vect/slp-widen-mult- |gcc.dg/vect/slp-widen-mult-
|half.c generating wrong |half.c generating wrong
|code on PowerPC64 |code on PowerPC64
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/57537] [4.8/4.9 Regression] gcc.dg/vect/slp-widen-mult-half.c generating wrong code on PowerPC64
2013-06-05 20:43 [Bug tree-optimization/57537] New: [4.8/4.9] gcc.dg/vect/slp-widen-mult-half.c generating wrong code on PowerPC64 brooks at gcc dot gnu.org
2013-06-06 10:44 ` [Bug tree-optimization/57537] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
@ 2013-06-12 7:58 ` jakub at gcc dot gnu.org
2013-06-12 13:15 ` jakub at gcc dot gnu.org
2013-06-12 13:49 ` brooks at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-06-12 7:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57537
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2013-06-12
CC| |jakub at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 30298
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30298&action=edit
gcc49-pr57537.patch
Untested fix.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/57537] [4.8/4.9 Regression] gcc.dg/vect/slp-widen-mult-half.c generating wrong code on PowerPC64
2013-06-05 20:43 [Bug tree-optimization/57537] New: [4.8/4.9] gcc.dg/vect/slp-widen-mult-half.c generating wrong code on PowerPC64 brooks at gcc dot gnu.org
2013-06-06 10:44 ` [Bug tree-optimization/57537] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2013-06-12 7:58 ` jakub at gcc dot gnu.org
@ 2013-06-12 13:15 ` jakub at gcc dot gnu.org
2013-06-12 13:49 ` brooks at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-06-12 13:15 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57537
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Jun 12 13:01:49 2013
New Revision: 200000
URL: http://gcc.gnu.org/viewcvs?rev=200000&root=gcc&view=rev
Log:
PR tree-optimization/57537
* tree-vect-patterns.c (vect_recog_widen_mult_pattern): If
vect_handle_widen_op_by_const, convert oprnd1 to half_type1.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-vect-patterns.c
Author: jakub
Date: Wed Jun 12 13:01:29 2013
New Revision: 199999
URL: http://gcc.gnu.org/viewcvs?rev=199999&root=gcc&view=rev
Log:
PR tree-optimization/57537
* tree-vect-patterns.c (vect_recog_widen_mult_pattern): If
vect_handle_widen_op_by_const, convert oprnd1 to half_type1.
Modified:
branches/gcc-4_8-branch/gcc/ChangeLog
branches/gcc-4_8-branch/gcc/tree-vect-patterns.c
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/57537] [4.8/4.9 Regression] gcc.dg/vect/slp-widen-mult-half.c generating wrong code on PowerPC64
2013-06-05 20:43 [Bug tree-optimization/57537] New: [4.8/4.9] gcc.dg/vect/slp-widen-mult-half.c generating wrong code on PowerPC64 brooks at gcc dot gnu.org
` (2 preceding siblings ...)
2013-06-12 13:15 ` jakub at gcc dot gnu.org
@ 2013-06-12 13:49 ` brooks at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: brooks at gcc dot gnu.org @ 2013-06-12 13:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57537
--- Comment #3 from Brooks Moses <brooks at gcc dot gnu.org> ---
Thanks for the quick fix, Jakub! And congratulations on the auspicious commit
number, as well. :)
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-06-12 13:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-05 20:43 [Bug tree-optimization/57537] New: [4.8/4.9] gcc.dg/vect/slp-widen-mult-half.c generating wrong code on PowerPC64 brooks at gcc dot gnu.org
2013-06-06 10:44 ` [Bug tree-optimization/57537] [4.8/4.9 Regression] " rguenth at gcc dot gnu.org
2013-06-12 7:58 ` jakub at gcc dot gnu.org
2013-06-12 13:15 ` jakub at gcc dot gnu.org
2013-06-12 13:49 ` brooks 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).