* [Bug tree-optimization/20256] Perfect nest transformation not conservative enough
2005-03-01 1:27 [Bug tree-optimization/20256] New: -ftree-loop-linear doesn't work right in small loop fjahanian at apple dot com
@ 2005-03-01 3:01 ` dberlin at gcc dot gnu dot org
2005-03-01 3:43 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: dberlin at gcc dot gnu dot org @ 2005-03-01 3:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dberlin at gcc dot gnu dot org 2005-03-01 03:01 -------
This is a problem in testing legality of the perfect nest transform.
We think we can transform the loop into a perfect nest, but can't really (at
least with the code we have now), and do it wrong.
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|-ftree-loop-linear doesn't |Perfect nest transformation
|work right in small loop |not conservative enough
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20256
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/20256] Perfect nest transformation not conservative enough
2005-03-01 1:27 [Bug tree-optimization/20256] New: -ftree-loop-linear doesn't work right in small loop fjahanian at apple dot com
2005-03-01 3:01 ` [Bug tree-optimization/20256] Perfect nest transformation not conservative enough dberlin at gcc dot gnu dot org
@ 2005-03-01 3:43 ` pinskia at gcc dot gnu dot org
2005-05-27 2:46 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-03-01 3:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-03-01 03:43 -------
Assigning to Daniel as he requestioned it :).
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |dberlin at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20256
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/20256] Perfect nest transformation not conservative enough
2005-03-01 1:27 [Bug tree-optimization/20256] New: -ftree-loop-linear doesn't work right in small loop fjahanian at apple dot com
2005-03-01 3:01 ` [Bug tree-optimization/20256] Perfect nest transformation not conservative enough dberlin at gcc dot gnu dot org
2005-03-01 3:43 ` pinskia at gcc dot gnu dot org
@ 2005-05-27 2:46 ` pinskia at gcc dot gnu dot org
2005-06-10 21:18 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-27 2:46 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 894 bytes --]
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-27 01:17 -------
We now get an ICE:
t.c: In function do_mid_forward:
t.c:5: error: Definition in block 9 does not dominate use in block 3
for SSA_NAME: sum_11 in statement:
sum_23 = PHI <sum_11(3)>;
PHI argument
sum_11
for PHI node
sum_23 = PHI <sum_11(3)>;
t.c:5: internal compiler error: verify_ssa failed.
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Last reconfirmed|2005-03-01 01:54:32 |2005-05-27 01:17:34
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20256
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/20256] Perfect nest transformation not conservative enough
2005-03-01 1:27 [Bug tree-optimization/20256] New: -ftree-loop-linear doesn't work right in small loop fjahanian at apple dot com
` (2 preceding siblings ...)
2005-05-27 2:46 ` pinskia at gcc dot gnu dot org
@ 2005-06-10 21:18 ` pinskia at gcc dot gnu dot org
2005-06-10 21:41 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-10 21:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-10 21:18 -------
On the mainline we get a different ICE:
t.c: In function 'do_mid_forward':
t.c:5: internal compiler error: tree check: expected integer_cst, have scev_not_known in int_cst_value, at
tree.c:6342
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comes from:
2186 step = evolution_part_in_loop_num (access_fn, loop->num);
2187 if ((step && int_cst_value (step) == xstep)
2188 || USE_FROM_PTR (use_p) == x)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20256
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/20256] Perfect nest transformation not conservative enough
2005-03-01 1:27 [Bug tree-optimization/20256] New: -ftree-loop-linear doesn't work right in small loop fjahanian at apple dot com
` (3 preceding siblings ...)
2005-06-10 21:18 ` pinskia at gcc dot gnu dot org
@ 2005-06-10 21:41 ` pinskia at gcc dot gnu dot org
2005-06-28 23:18 ` bangerth at dealii dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-10 21:41 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-10 21:41 -------
(In reply to comment #5)
> On the mainline we get a different ICE:
After:
2005-06-10 Daniel Berlin <dberlin@dberlin.org>
* lambda-code.c (replace_uses_equiv_to_x_with_y): Check step
and access function against chrec_dont_know.
We are back to the ICE in comment #4.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20256
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/20256] Perfect nest transformation not conservative enough
2005-03-01 1:27 [Bug tree-optimization/20256] New: -ftree-loop-linear doesn't work right in small loop fjahanian at apple dot com
` (4 preceding siblings ...)
2005-06-10 21:41 ` pinskia at gcc dot gnu dot org
@ 2005-06-28 23:18 ` bangerth at dealii dot org
2005-06-28 23:20 ` pinskia at gcc dot gnu dot org
2005-06-29 0:11 ` dberlin at dberlin dot org
7 siblings, 0 replies; 13+ messages in thread
From: bangerth at dealii dot org @ 2005-06-28 23:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2005-06-28 23:17 -------
Andrew's code in comment #4 is invalid (don't call no-arg functions with
arguments!), but here's a version that also passes through the c++
frontend and crashes the optimizers:
----------------------
int foo() {
int x[2][2], y[2];
int s;
for (int n=0; n<2; n++)
{
s = 0;
for (int i=0; i<2; i++)
s += x[n][i]*y[i];
s += 1;
}
return s;
}
--------------------
g/x> /home/bangerth/bin/gcc-4.1-pre/bin/gcc -c x.cc -O2 -ftree-loop-linear
x.cc: In function ‘int foo()’:
x.cc:1: error: Definition in block 9 does not dominate use in block 3
for SSA_NAME: s_11 in statement:
s_7 = PHI <s_11(3)>;
PHI argument
s_11
for PHI node
s_7 = PHI <s_11(3)>;
x.cc:1: internal compiler error: verify_ssa failed.
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20256
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/20256] Perfect nest transformation not conservative enough
2005-03-01 1:27 [Bug tree-optimization/20256] New: -ftree-loop-linear doesn't work right in small loop fjahanian at apple dot com
` (5 preceding siblings ...)
2005-06-28 23:18 ` bangerth at dealii dot org
@ 2005-06-28 23:20 ` pinskia at gcc dot gnu dot org
2005-06-29 0:11 ` dberlin at dberlin dot org
7 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-28 23:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-28 23:20 -------
(In reply to comment #7)
> Andrew's code in comment #4 is invalid (don't call no-arg functions with
> arguments!), but here's a version that also passes through the c++
> frontend and crashes the optimizers:
Actually it is valid C. because "void f()" in C means the same as "void f(...)".
My testcase was to show the wrong code at the time.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20256
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/20256] Perfect nest transformation not conservative enough
2005-03-01 1:27 [Bug tree-optimization/20256] New: -ftree-loop-linear doesn't work right in small loop fjahanian at apple dot com
` (6 preceding siblings ...)
2005-06-28 23:20 ` pinskia at gcc dot gnu dot org
@ 2005-06-29 0:11 ` dberlin at dberlin dot org
7 siblings, 0 replies; 13+ messages in thread
From: dberlin at dberlin dot org @ 2005-06-29 0:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dberlin at gcc dot gnu dot org 2005-06-29 00:11 -------
Subject: Re: Perfect nest transformation not
conservative enough
On Tue, 2005-06-28 at 23:17 +0000, bangerth at dealii dot org wrote:
> ------- Additional Comments From bangerth at dealii dot org 2005-06-28 23:17 -------
> Andrew's code in comment #4 is invalid (don't call no-arg functions with
> arguments!), but here's a version that also passes through the c++
> frontend and crashes the optimizers:
>
> ----------------------
> int foo() {
> int x[2][2], y[2];
> int s;
> for (int n=0; n<2; n++)
> {
> s = 0;
> for (int i=0; i<2; i++)
> s += x[n][i]*y[i];
> s += 1;
> }
> return s;
> }
> --------------------
>
yeah, we shouldn't be trying to transform this :)
at least, not with the current scheme
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20256
^ permalink raw reply [flat|nested] 13+ messages in thread