public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/46761] New: [4.6 Regression] -fgraphite-identity produces wrong code for array initialization arr[i] = i
@ 2010-12-02 2:20 zsojka at seznam dot cz
2010-12-02 2:33 ` [Bug middle-end/46761] " zsojka at seznam dot cz
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2010-12-02 2:20 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46761
Summary: [4.6 Regression] -fgraphite-identity produces wrong
code for array initialization arr[i] = i
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: zsojka@seznam.cz
CC: spop@gcc.gnu.org
Host: x86_64-pc-linux-gnu
Target: x86_64-pc-linux-gnu
Created attachment 22599
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22599
reduced testcase
This might be the common cause of several testsuite failures that appear with
-fgraphite-identity in testflags.
Output:
$ gcc -O -fgraphite-identity pr46761.c
$ valgrind -q ./a.out
==20462== Conditional jump or move depends on uninitialised value(s)
==20462== at 0x40053F: main (pr46761.c:12)
==20462==
Aborted
Tested revisions:
r167356 - fail
r165699 - fail
r161659 - OK
4.5 r166509 - OK
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/46761] [4.6 Regression] -fgraphite-identity produces wrong code for array initialization arr[i] = i
2010-12-02 2:20 [Bug middle-end/46761] New: [4.6 Regression] -fgraphite-identity produces wrong code for array initialization arr[i] = i zsojka at seznam dot cz
@ 2010-12-02 2:33 ` zsojka at seznam dot cz
2010-12-02 3:03 ` hjl.tools at gmail dot com
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2010-12-02 2:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46761
--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> 2010-12-02 02:32:58 UTC ---
C failures I am currently (trunk r167356) seeing at x86_64-linux with
-fgraphite-identity:
FAIL: gcc.c-torture/execute/20100416-1.c execution, -O1
FAIL: gcc.dg/vect/pr37539.c execution test
FAIL: gcc.dg/vect/vect-25.c execution test
FAIL: gcc.dg/vect/vect-26.c execution test
FAIL: gcc.dg/vect/vect-27.c execution test
FAIL: gcc.dg/vect/vect-28.c execution test
FAIL: gcc.dg/vect/vect-29.c execution test
FAIL: gcc.dg/vect/vect-54.c execution test
FAIL: gcc.dg/vect/vect-56.c execution test
FAIL: gcc.dg/vect/vect-7.c execution test
FAIL: gcc.dg/vect/vect-72.c execution test
FAIL: gcc.dg/vect/vect-peel-1.c execution test
FAIL: gcc.dg/vect/vect-peel-3.c execution test
FAIL: gcc.dg/vect/vect-strided-store-u16-i4.c execution test
FAIL: gcc.dg/vect/slp-1.c execution test
FAIL: gcc.dg/vect/slp-2.c execution test
FAIL: gcc.dg/vect/slp-20.c execution test
FAIL: gcc.dg/vect/slp-21.c execution test
FAIL: gcc.dg/vect/slp-22.c execution test
FAIL: gcc.dg/vect/slp-multitypes-1.c execution test
FAIL: gcc.dg/vect/slp-multitypes-12.c execution test
FAIL: gcc.dg/vect/slp-multitypes-2.c execution test
FAIL: gcc.dg/vect/slp-reduc-5.c execution test
FAIL: gcc.dg/vect/slp-reduc-6.c execution test
FAIL: gcc.dg/vect/no-vfa-vect-57.c execution test
FAIL: gcc.dg/vect/wrapv-vect-7.c execution test
FAIL: gcc.dg/vect/no-section-anchors-vect-outer-4h.c execution test
FAIL: gcc.dg/vect/no-scevccp-slp-30.c execution test
FAIL: gcc.dg/vect/no-scevccp-slp-31.c execution test
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/46761] [4.6 Regression] -fgraphite-identity produces wrong code for array initialization arr[i] = i
2010-12-02 2:20 [Bug middle-end/46761] New: [4.6 Regression] -fgraphite-identity produces wrong code for array initialization arr[i] = i zsojka at seznam dot cz
2010-12-02 2:33 ` [Bug middle-end/46761] " zsojka at seznam dot cz
@ 2010-12-02 3:03 ` hjl.tools at gmail dot com
2010-12-03 16:54 ` amonakov at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2010-12-02 3:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46761
H.J. Lu <hjl.tools at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2010.12.02 03:03:05
Target Milestone|--- |4.6.0
Ever Confirmed|0 |1
--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> 2010-12-02 03:03:05 UTC ---
It is caused by revision 164772:
http://gcc.gnu.org/ml/gcc-cvs/2010-09/msg01071.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/46761] [4.6 Regression] -fgraphite-identity produces wrong code for array initialization arr[i] = i
2010-12-02 2:20 [Bug middle-end/46761] New: [4.6 Regression] -fgraphite-identity produces wrong code for array initialization arr[i] = i zsojka at seznam dot cz
2010-12-02 2:33 ` [Bug middle-end/46761] " zsojka at seznam dot cz
2010-12-02 3:03 ` hjl.tools at gmail dot com
@ 2010-12-03 16:54 ` amonakov at gcc dot gnu.org
2010-12-06 21:23 ` zsojka at seznam dot cz
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: amonakov at gcc dot gnu.org @ 2010-12-03 16:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46761
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amonakov at gcc dot gnu.org
--- Comment #3 from Alexander Monakov <amonakov at gcc dot gnu.org> 2010-12-03 16:54:26 UTC ---
Sometimes graphite generates wrong guards for regions. The following patch
fixes the attached testcase for me, but I have not tested it any further.
diff --git a/gcc/graphite-clast-to-gimple.c b/gcc/graphite-clast-to-gimple.c
index 9a90ef7..8a80033 100644
--- a/gcc/graphite-clast-to-gimple.c
+++ b/gcc/graphite-clast-to-gimple.c
@@ -986,7 +986,7 @@ graphite_create_new_loop_guard (sese region, edge
entry_edge,
: PLUS_EXPR, type, ub, one);
/* When ub + 1 wraps around, use lb <= ub. */
- if (integer_zerop (ub_one))
+ if (TREE_OVERFLOW_P (ub_one))
cond_expr = fold_build2 (LE_EXPR, boolean_type_node, lb, ub);
else
cond_expr = fold_build2 (LT_EXPR, boolean_type_node, lb, ub_one);
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/46761] [4.6 Regression] -fgraphite-identity produces wrong code for array initialization arr[i] = i
2010-12-02 2:20 [Bug middle-end/46761] New: [4.6 Regression] -fgraphite-identity produces wrong code for array initialization arr[i] = i zsojka at seznam dot cz
` (2 preceding siblings ...)
2010-12-03 16:54 ` amonakov at gcc dot gnu.org
@ 2010-12-06 21:23 ` zsojka at seznam dot cz
2010-12-08 18:05 ` amonakov at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: zsojka at seznam dot cz @ 2010-12-06 21:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46761
--- Comment #4 from Zdenek Sojka <zsojka at seznam dot cz> 2010-12-06 21:23:00 UTC ---
(In reply to comment #3)
> Sometimes graphite generates wrong guards for regions. The following patch
> fixes the attached testcase for me, but I have not tested it any further.
This patch fixes all failures except two:
FAIL: gcc.c-torture/execute/20100416-1.c execution, -O1 (PR46758)
FAIL: gfortran.dg/array_constructor_12.f90 -Os execution test (probably the
same as PR46758 ; I didn't run fortran testsuite for comment #1)
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/46761] [4.6 Regression] -fgraphite-identity produces wrong code for array initialization arr[i] = i
2010-12-02 2:20 [Bug middle-end/46761] New: [4.6 Regression] -fgraphite-identity produces wrong code for array initialization arr[i] = i zsojka at seznam dot cz
` (3 preceding siblings ...)
2010-12-06 21:23 ` zsojka at seznam dot cz
@ 2010-12-08 18:05 ` amonakov at gcc dot gnu.org
2010-12-17 12:55 ` amonakov at gcc dot gnu.org
2010-12-17 12:57 ` amonakov at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: amonakov at gcc dot gnu.org @ 2010-12-08 18:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46761
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |amonakov at gcc dot gnu.org
|gnu.org |
--- Comment #5 from Alexander Monakov <amonakov at gcc dot gnu.org> 2010-12-08 18:05:23 UTC ---
Thanks. I'll submit this patch
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/46761] [4.6 Regression] -fgraphite-identity produces wrong code for array initialization arr[i] = i
2010-12-02 2:20 [Bug middle-end/46761] New: [4.6 Regression] -fgraphite-identity produces wrong code for array initialization arr[i] = i zsojka at seznam dot cz
` (4 preceding siblings ...)
2010-12-08 18:05 ` amonakov at gcc dot gnu.org
@ 2010-12-17 12:55 ` amonakov at gcc dot gnu.org
2010-12-17 12:57 ` amonakov at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: amonakov at gcc dot gnu.org @ 2010-12-17 12:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46761
--- Comment #6 from Alexander Monakov <amonakov at gcc dot gnu.org> 2010-12-17 12:55:03 UTC ---
Author: amonakov
Date: Fri Dec 17 12:54:59 2010
New Revision: 167980
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167980
Log:
PR middle-end/46761
* graphite-clast-to-gimple.c (graphite_create_new_loop_guard): Prefer
to use unadjusted UB.
testsuite:
* gcc.dg/graphite/pr46761.c: New.
Added:
trunk/gcc/testsuite/gcc.dg/graphite/pr46761.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/graphite-clast-to-gimple.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/46761] [4.6 Regression] -fgraphite-identity produces wrong code for array initialization arr[i] = i
2010-12-02 2:20 [Bug middle-end/46761] New: [4.6 Regression] -fgraphite-identity produces wrong code for array initialization arr[i] = i zsojka at seznam dot cz
` (5 preceding siblings ...)
2010-12-17 12:55 ` amonakov at gcc dot gnu.org
@ 2010-12-17 12:57 ` amonakov at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: amonakov at gcc dot gnu.org @ 2010-12-17 12:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46761
Alexander Monakov <amonakov at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #7 from Alexander Monakov <amonakov at gcc dot gnu.org> 2010-12-17 12:57:27 UTC ---
A different patch was committed after the review. Closing as fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-12-17 12:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-02 2:20 [Bug middle-end/46761] New: [4.6 Regression] -fgraphite-identity produces wrong code for array initialization arr[i] = i zsojka at seznam dot cz
2010-12-02 2:33 ` [Bug middle-end/46761] " zsojka at seznam dot cz
2010-12-02 3:03 ` hjl.tools at gmail dot com
2010-12-03 16:54 ` amonakov at gcc dot gnu.org
2010-12-06 21:23 ` zsojka at seznam dot cz
2010-12-08 18:05 ` amonakov at gcc dot gnu.org
2010-12-17 12:55 ` amonakov at gcc dot gnu.org
2010-12-17 12:57 ` amonakov 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).