* [Bug tree-optimization/38497] PRE missing a load PRE which causes a loop to have two BBs
2008-12-11 23:22 [Bug tree-optimization/38497] New: " pinskia at gcc dot gnu dot org
@ 2008-12-11 23:25 ` pinskia at gcc dot gnu dot org
2010-03-02 19:01 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-11 23:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-12-11 23:24 -------
This is a reduced testcase from The huffman byte benchmark.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38497
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/38497] PRE missing a load PRE which causes a loop to have two BBs
2008-12-11 23:22 [Bug tree-optimization/38497] New: " pinskia at gcc dot gnu dot org
2008-12-11 23:25 ` [Bug tree-optimization/38497] " pinskia at gcc dot gnu dot org
@ 2010-03-02 19:01 ` pinskia at gcc dot gnu dot org
2010-03-03 10:43 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-03-02 19:01 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2010-03-02 19:01 -------
Still happens as of today on the trunk.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38497
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/38497] PRE missing a load PRE which causes a loop to have two BBs
2008-12-11 23:22 [Bug tree-optimization/38497] New: " pinskia at gcc dot gnu dot org
2008-12-11 23:25 ` [Bug tree-optimization/38497] " pinskia at gcc dot gnu dot org
2010-03-02 19:01 ` pinskia at gcc dot gnu dot org
@ 2010-03-03 10:43 ` rguenth at gcc dot gnu dot org
2010-03-03 10:57 ` steven at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-03-03 10:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2010-03-03 10:43 -------
This isn't PRE but code hoisting which we have a dup for.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |stevenb dot gcc at gmail dot
| |com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38497
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/38497] PRE missing a load PRE which causes a loop to have two BBs
2008-12-11 23:22 [Bug tree-optimization/38497] New: " pinskia at gcc dot gnu dot org
` (2 preceding siblings ...)
2010-03-03 10:43 ` rguenth at gcc dot gnu dot org
@ 2010-03-03 10:57 ` steven at gcc dot gnu dot org
2010-03-03 11:03 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-03-03 10:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from steven at gcc dot gnu dot org 2010-03-03 10:57 -------
I think pinskia means we could transform the test case of comment #0 to:
void DoHuffIteration(int);
int f(int *a)
{
int i;
int plaintextlen=*a;
pretmp = plaintextlen;
for(i = 0; i< 10000; i++)
{
DoHuffIteration(pretmp);
pretmp = *a;
}
return pretmp - plaintextlen;
}
which makes this PRE, not hoisting.
--
steven at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|stevenb dot gcc at gmail dot|
|com |
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-03-03 10:57:32
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38497
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/38497] PRE missing a load PRE which causes a loop to have two BBs
2008-12-11 23:22 [Bug tree-optimization/38497] New: " pinskia at gcc dot gnu dot org
` (3 preceding siblings ...)
2010-03-03 10:57 ` steven at gcc dot gnu dot org
@ 2010-03-03 11:03 ` rguenth at gcc dot gnu dot org
2010-03-03 14:26 ` steven at gcc dot gnu dot org
2010-05-05 10:31 ` rguenth at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-03-03 11:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2010-03-03 11:03 -------
I'm not so sure. We start with
<bb 2>:
plaintextlen_3 = *a_2(D);
<bb 3>:
# i_13 = PHI <i_6(5), 0(2)>
D.2725_5 = *a_2(D);
DoHuffIteration (D.2725_5);
i_6 = i_13 + 1;
if (i_6 <= 9999)
goto <bb 5>;
else
goto <bb 4>;
<bb 5>:
goto <bb 3>;
<bb 4>:
D.2725_7 = *a_2(D);
so *a_2 (4) is antic-out in bb3 but dies in bb3 (thus it's not antic-in there).
*a_2 (3) is antic-in in bb5 and available in bb2. Thus we insert in bb5:
<bb 2>:
plaintextlen_3 = *a_2(D);
<bb 3>:
# i_13 = PHI <i_6(5), 0(2)>
# prephitmp.3_14 = PHI <pretmp.2_1(5), plaintextlen_3(2)>
D.2725_5 = prephitmp.3_14;
DoHuffIteration (D.2725_5);
i_6 = i_13 + 1;
if (i_6 <= 9999)
goto <bb 5>;
else
goto <bb 4>;
<bb 5>:
pretmp.2_1 = *a_2(D);
goto <bb 3>;
<bb 4>:
D.2725_7 = *a_2(D);
now what is left is hoisting *a_2(D) to after the call. But that's not PRE.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38497
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/38497] PRE missing a load PRE which causes a loop to have two BBs
2008-12-11 23:22 [Bug tree-optimization/38497] New: " pinskia at gcc dot gnu dot org
` (4 preceding siblings ...)
2010-03-03 11:03 ` rguenth at gcc dot gnu dot org
@ 2010-03-03 14:26 ` steven at gcc dot gnu dot org
2010-05-05 10:31 ` rguenth at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: steven at gcc dot gnu dot org @ 2010-03-03 14:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from steven at gcc dot gnu dot org 2010-03-03 14:26 -------
Well, it is not hoisting, either.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38497
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug tree-optimization/38497] PRE missing a load PRE which causes a loop to have two BBs
2008-12-11 23:22 [Bug tree-optimization/38497] New: " pinskia at gcc dot gnu dot org
` (5 preceding siblings ...)
2010-03-03 14:26 ` steven at gcc dot gnu dot org
@ 2010-05-05 10:31 ` rguenth at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-05 10:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from rguenth at gcc dot gnu dot org 2010-05-05 10:30 -------
As *a_2(D) is ANTIC_OUT in bb3 (but not ANTIC_IN in bb3 because it dies in
there)
can we insert in bb3 instead of in bb5?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38497
^ permalink raw reply [flat|nested] 8+ messages in thread