public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/43567] linear loop transform
[not found] <bug-43567-18979@http.gcc.gnu.org/bugzilla/>
@ 2010-06-25 19:16 ` tjvries at xs4all dot nl
2010-06-25 20:06 ` tjvries at xs4all dot nl
2010-07-11 6:10 ` tjvries at xs4all dot nl
2 siblings, 0 replies; 9+ messages in thread
From: tjvries at xs4all dot nl @ 2010-06-25 19:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tjvries at xs4all dot nl 2010-06-25 19:16 -------
Created an attachment (id=21007)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21007&action=view)
slightly more minimal testcase
reproduced on trunk revision 161295
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43567
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/43567] linear loop transform
[not found] <bug-43567-18979@http.gcc.gnu.org/bugzilla/>
2010-06-25 19:16 ` [Bug tree-optimization/43567] linear loop transform tjvries at xs4all dot nl
@ 2010-06-25 20:06 ` tjvries at xs4all dot nl
2010-07-11 6:10 ` tjvries at xs4all dot nl
2 siblings, 0 replies; 9+ messages in thread
From: tjvries at xs4all dot nl @ 2010-06-25 20:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from tjvries at xs4all dot nl 2010-06-25 20:06 -------
Created an attachment (id=21008)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21008&action=view)
partially redoing the fix for bug 20612
The problem is in this piece of code in lambda_loopnest_gcc_loopnest:
...
/* Create the new iv. */
standard_iv_increment_position (temp, &bsi, &insert_after);
create_iv (newlowerbound,
build_int_cst (type, LL_STEP (newloop)),
ivvar, temp, &bsi, insert_after, &ivvar,
NULL);
/* Unfortunately, the incremented ivvar that create_iv inserted may not
dominate the block containing the exit condition.
So we simply create our own incremented iv to use in the new exit
test, and let redundancy elimination sort it out. */
inc_stmt = gimple_build_assign_with_ops (PLUS_EXPR, SSA_NAME_VAR (ivvar),
ivvar,
build_int_cst (type, LL_STEP
(newloop)));
ivvarinced = make_ssa_name (SSA_NAME_VAR (ivvar), inc_stmt);
gimple_assign_set_lhs (inc_stmt, ivvarinced);
bsi = gsi_for_stmt (exitcond);
gsi_insert_before (&bsi, inc_stmt, GSI_SAME_STMT);
...
In case the loop header is copied (-ftree-ch), the second increment is in the
same block as the first increment:
...
lnivtmp.6_13 = lnivtmp.6_20 + 1;
lnivtmp.6_1 = lnivtmp.6_20 + 1;
if (lletmp.8_21 >= lnivtmp.6_1)
...
indeed redundancy elimination sorts this out.
However, if the loop header is not copied:
...<bb 5>:
i_11 = i_1 + 1;
lnivtmp.2_19 = lnivtmp.2_5 + 1;
<bb 6>:
# i_1 = PHI <0(2), i_11(5)>
# lnivtmp.2_5 = PHI <0(2), lnivtmp.2_19(5)>
lletmp.4_16 = n_4(D) + -1;
lnivtmp.2_17 = lnivtmp.2_5 + 1;
if (lletmp.4_16 >= lnivtmp.2_17)
...
the second increment is an extra increment, on top of the first one.
The patches fixes this, I'm not sure how minimal or efficient, but I did a
x86_64-unknown-linux-gnu bootstrap build and ran testsuites (gcc, objc,
gfortran, g++, libgomp, libstdc++, libjava, libmudflap, libffi) for r161295
and r161295+patch, with identical results.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43567
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/43567] linear loop transform
[not found] <bug-43567-18979@http.gcc.gnu.org/bugzilla/>
2010-06-25 19:16 ` [Bug tree-optimization/43567] linear loop transform tjvries at xs4all dot nl
2010-06-25 20:06 ` tjvries at xs4all dot nl
@ 2010-07-11 6:10 ` tjvries at xs4all dot nl
2 siblings, 0 replies; 9+ messages in thread
From: tjvries at xs4all dot nl @ 2010-07-11 6:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from tjvries at xs4all dot nl 2010-07-11 06:10 -------
submitted patch for review:
http://gcc.gnu.org/ml/gcc-patches/2010-07/msg00879.html
--
tjvries at xs4all dot nl changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tjvries at xs4all dot nl
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43567
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/43567] linear loop transform
[not found] <bug-43567-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2011-01-25 22:05 ` spop at gcc dot gnu.org
@ 2011-02-02 17:48 ` dnovillo at gcc dot gnu.org
5 siblings, 0 replies; 9+ messages in thread
From: dnovillo at gcc dot gnu.org @ 2011-02-02 17:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43567
--- Comment #10 from Diego Novillo <dnovillo at gcc dot gnu.org> 2011-02-02 17:48:04 UTC ---
Author: dnovillo
Date: Wed Feb 2 17:48:00 2011
New Revision: 169591
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169591
Log:
Add testcase for PR43567.
2011-01-25 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/43567
* gcc.dg/graphite/pr43567.c: New.
Added:
branches/google/integration/gcc/testsuite/gcc.dg/graphite/pr43567.c
Modified:
branches/google/integration/gcc/ChangeLog.graphite
branches/google/integration/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/43567] linear loop transform
[not found] <bug-43567-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2011-01-25 21:27 ` spop at gcc dot gnu.org
@ 2011-01-25 22:05 ` spop at gcc dot gnu.org
2011-02-02 17:48 ` dnovillo at gcc dot gnu.org
5 siblings, 0 replies; 9+ messages in thread
From: spop at gcc dot gnu.org @ 2011-01-25 22:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43567
Sebastian Pop <spop at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #9 from Sebastian Pop <spop at gcc dot gnu.org> 2011-01-25 21:28:23 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/43567] linear loop transform
[not found] <bug-43567-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2011-01-18 21:03 ` spop at gcc dot gnu.org
@ 2011-01-25 21:27 ` spop at gcc dot gnu.org
2011-01-25 22:05 ` spop at gcc dot gnu.org
2011-02-02 17:48 ` dnovillo at gcc dot gnu.org
5 siblings, 0 replies; 9+ messages in thread
From: spop at gcc dot gnu.org @ 2011-01-25 21:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43567
--- Comment #8 from Sebastian Pop <spop at gcc dot gnu.org> 2011-01-25 21:24:41 UTC ---
Author: spop
Date: Tue Jan 25 21:24:35 2011
New Revision: 169252
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=169252
Log:
Add testcase for PR43567.
2011-01-25 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/43567
* gcc.dg/graphite/pr43567.c: New.
Added:
trunk/gcc/testsuite/gcc.dg/graphite/pr43567.c
Modified:
trunk/gcc/ChangeLog.graphite
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/43567] linear loop transform
[not found] <bug-43567-4@http.gcc.gnu.org/bugzilla/>
2011-01-18 20:55 ` spop at gcc dot gnu.org
2011-01-18 20:55 ` spop at gcc dot gnu.org
@ 2011-01-18 21:03 ` spop at gcc dot gnu.org
2011-01-25 21:27 ` spop at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: spop at gcc dot gnu.org @ 2011-01-18 21:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43567
Sebastian Pop <spop at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011.01.18 20:57:45
AssignedTo|unassigned at gcc dot |spop at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #7 from Sebastian Pop <spop at gcc dot gnu.org> 2011-01-18 20:57:45 UTC ---
Fixed on the graphite branch.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/43567] linear loop transform
[not found] <bug-43567-4@http.gcc.gnu.org/bugzilla/>
2011-01-18 20:55 ` spop at gcc dot gnu.org
@ 2011-01-18 20:55 ` spop at gcc dot gnu.org
2011-01-18 21:03 ` spop at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: spop at gcc dot gnu.org @ 2011-01-18 20:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43567
--- Comment #6 from Sebastian Pop <spop at gcc dot gnu.org> 2011-01-18 20:54:23 UTC ---
Author: spop
Date: Tue Jan 18 20:54:18 2011
New Revision: 168962
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168962
Log:
Add testcase for PR43567.
2011-01-18 Sebastian Pop <sebastian.pop@amd.com>
PR tree-optimization/43567
* gcc.dg/graphite/pr43567.c: New.
Added:
branches/graphite/gcc/testsuite/gcc.dg/graphite/pr43567.c
Modified:
branches/graphite/gcc/ChangeLog.graphite
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/43567] linear loop transform
[not found] <bug-43567-4@http.gcc.gnu.org/bugzilla/>
@ 2011-01-18 20:55 ` spop at gcc dot gnu.org
2011-01-18 20:55 ` spop at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: spop at gcc dot gnu.org @ 2011-01-18 20:55 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43567
--- Comment #5 from Sebastian Pop <spop at gcc dot gnu.org> 2011-01-18 20:47:10 UTC ---
*** Bug 43568 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-02-02 17:48 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-43567-18979@http.gcc.gnu.org/bugzilla/>
2010-06-25 19:16 ` [Bug tree-optimization/43567] linear loop transform tjvries at xs4all dot nl
2010-06-25 20:06 ` tjvries at xs4all dot nl
2010-07-11 6:10 ` tjvries at xs4all dot nl
[not found] <bug-43567-4@http.gcc.gnu.org/bugzilla/>
2011-01-18 20:55 ` spop at gcc dot gnu.org
2011-01-18 20:55 ` spop at gcc dot gnu.org
2011-01-18 21:03 ` spop at gcc dot gnu.org
2011-01-25 21:27 ` spop at gcc dot gnu.org
2011-01-25 22:05 ` spop at gcc dot gnu.org
2011-02-02 17:48 ` dnovillo 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).