--
Bug 19639 depends on bug 17640, which changed state.
Bug 17640 Summary: empty loop not removed after optimization
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17640
What|Old Value |New Value
--- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-05-11
08:15 ---
Subject: Bug 19639
CVSROOT:/cvs/gcc
Module name:gcc
Changes by: [EMAIL PROTECTED] 2005-05-11 08:14:45
Modified files:
gcc: ChangeLog fold-const.c
--
Bug 19639 depends on bug 19807, which changed state.
Bug 19807 Summary: fold does not fold a[4]-1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19807
What|Old Value |New Value
--- Additional Comments From rguenth at gcc dot gnu dot org 2005-05-11
09:14 ---
With optimization we now get
void foo() ()
{
unsigned int ivtmp.0;
struct Foo * const this;
register struct Foo * D.1740;
struct Foo[2] * D.1739;
struct NonPod x;
bb 0:
L6:;
return;
}
aka
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-07
19:09 ---
On the mainline I get:
void foo() ()
{
void * ivtmp.3;
struct NonPod x;
bb 0:
ivtmp.3 = x.foo[2];
L2:;
ivtmp.3 = ivtmp.3 - 4B;
if (ivtmp.3 == x.foo) goto L6; else goto L2;
L6:;
return;
}
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-25
14:51 ---
Patch posted here: http://gcc.gnu.org/ml/gcc-patches/2005-04/msg02592.html.
--
What|Removed |Added
--- Additional Comments From rguenth at gcc dot gnu dot org 2005-02-16
09:52 ---
With PR15791 fixed we now create at -O2
void foo() ()
{
struct Foo * const this.6;
struct Foo * D.1654;
struct Foo * const this;
register struct Foo * D.1634;
struct Foo[2] * D.1633;
struct
--- Additional Comments From rguenth at gcc dot gnu dot org 2005-02-07
14:43 ---
The missed folding of x.foo[2] - 4B is again due to different representation
of array refs for C and C++. A C testcase is folded, a C++ not.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19639
--
What|Removed |Added
BugsThisDependsOn||19807
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19639
--- Additional Comments From rguenth at gcc dot gnu dot org 2005-02-07
17:22 ---
Split that missed x.foo[2] - 4B folding out to PR19807.
--
What|Removed |Added
--- Additional Comments From rguenth at gcc dot gnu dot org 2005-02-07
17:25 ---
It seems the new (and old?) bugzilla doesn't check up-to-date-ness of the bug
wrt changes of just depends on. Re-added 19807.
--
What|Removed |Added
--- Additional Comments From rguenth at tat dot physik dot uni-tuebingen
dot de 2005-01-30 18:54 ---
Subject: Re: Funny (horrible) code for empty
destructor
pinskia at gcc dot gnu dot org wrote:
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-29
21:19
--
Bug 19639 depends on bug 15791, which changed state.
Bug 15791 Summary: fold misses that two ADDR_EXPR of an arrary obvious not equal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15791
What|Old Value |New Value
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-29
20:48 ---
(In reply to comment #5)
What other pass than fold() is supposed to handle this sort of simplification?
Actually if you look at the tree dumps you will see that we removed that if.
It does not help the
--- Additional Comments From rguenth at tat dot physik dot uni-tuebingen
dot de 2005-01-29 21:14 ---
Or we could simply unroll the loop completely, but while SCEV finds
the IV as
(set_scalar_evolution
(scalar = this_6)
(scalar_evolution = {(struct Foo * const) x.foo[2] - 4B, +,
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-29
21:19 ---
As(In reply to comment #7)
Or we could simply unroll the loop completely, but while SCEV finds
the IV as
Again this is most likely because fold does not fold x.foo[2] - 4B to
x.foo[0], or someone
--- Additional Comments From rguenth at tat dot physik dot uni-tuebingen
dot de 2005-01-28 14:21 ---
Folding x.foo[2] == x.foo to false does not help the testcase, as fold
never sees this comparison. Instead the initial code the C++ frontend
creates for ctor and dtor of arrays contains
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-26
13:57 ---
Well there are multiple problems in this bug.
One is that empty loops are not removed (PR 17640). The only problem
Another is that we don't fold (x.foo[2] == x.foo) to false
And x.foo[2] - 4B to x.foo[0]
--- Additional Comments From rguenth at tat dot physik dot uni-tuebingen
dot de 2005-01-26 14:10 ---
We can also not fold i[0] == i[1] to false in
int foo(void)
{
int i[2];
if (i[0] == i[1])
return 1;
return 0;
}
or i+0 == i+1 which is
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-26
14:17 ---
(In reply to comment #2)
We can also not fold i[0] == i[1] to false in
I filed PR 19641 for that.
--
What|Removed |Added
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-26
14:19 ---
(In reply to comment #3)
(In reply to comment #2)
We can also not fold i[0] == i[1] to false in
I filed PR 19641 for that.
Actually I had already file PR 15791 for that.
--
What|Removed
21 matches
Mail list logo