[Patch] Silent gcc 4.2.0 loop optimization bug with -O2
Alexander Kabaev
kabaev at gmail.com
Wed Jul 4 22:10:38 UTC 2007
On Wed, 4 Jul 2007 22:56:03 +0200
Roman Divacky <rdivacky at freebsd.org> wrote:
> On Wed, Jul 04, 2007 at 11:01:48PM +0400, Andrey Chernov wrote:
> > On Wed, Jul 04, 2007 at 02:12:08PM +0200, Ed Schouten wrote:
> > > > Index: tree-ssa-loop-niter.c
> > > > ===================================================================
> > > > --- tree-ssa-loop-niter.c (revision 126260)
> > > > +++ tree-ssa-loop-niter.c (working copy)
> > > > @@ -1747,6 +1747,12 @@ infer_loop_bounds_from_undefined (struct
> > > > {
> > > > bb = bbs[i];
> > > >
> > > > + /* If BB is not executed in each iteration of the loop,
> > > > we cannot
> > > > + use the operations in it to infer reliable upper bound
> > > > on the
> > > > + # of iterations of the loop. */
> > > > + if (!dominated_by_p (CDI_DOMINATORS, loop->latch, bb))
> > > > + continue;
> > > > +
> > > > for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next
> > > > (&bsi)) {
> > > > tree stmt = bsi_stmt (bsi);
> > > >
> > > > I'm going to test this.
> > > >
> > > ----- End forwarded message -----
> > >
> > > I just tested the patch on my desktop and it seems to work. The
> > > test code now compiles like it should. Hopefully it will be part
> > > of 4.2.1.
> >
> > Will be nice if this patch will be commited in instead of my
> > sys.mk workaround. Alexander?
>
> afaik they plan to release gcc 4.2.1 on July 13th, thats a week,
> possibly two ahead. maybe we can wait and import the 4.2.1 directly.
> 4.2.1 contains some more bug fixes so it would be worth it.
>
> roman
4.2.1 import will happen when 4.2.1 is released.
--
Alexander Kabaev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20070704/b84663ce/signature.pgp
More information about the freebsd-current
mailing list