Re: [PING] [PATCH] PR58143/58227 wrong code at -O3

2013-10-16 Thread Michael Matz
Hi, On Tue, 15 Oct 2013, Richard Biener wrote: > On Sun, Oct 6, 2013 at 2:22 PM, Bernd Edlinger > wrote: > > How I should proceed with this patch, is it OK? > > > > The latest version was posted at: > > http://gcc.gnu.org/ml/gcc-patches/2013-09/msg00234.html > > I have now attached a quick dra

Re: [PING] [PATCH] PR58143/58227 wrong code at -O3

2013-10-15 Thread Richard Biener
On Sun, Oct 6, 2013 at 2:22 PM, Bernd Edlinger wrote: > Ping! > > > How I should proceed with this patch, is it OK? > > The latest version was posted at: > http://gcc.gnu.org/ml/gcc-patches/2013-09/msg00234.html I have now attached a quick draft of a patch that rewrites the moved stmts to not ex

RE: [PING] [PATCH] PR58143/58227 wrong code at -O3

2013-10-06 Thread Bernd Edlinger
Ping! How I should proceed with this patch, is it OK? The latest version was posted at: http://gcc.gnu.org/ml/gcc-patches/2013-09/msg00234.html Thanks, Bernd. > > ping... > > On Wed, 4 Sep 2013 18:45:39, Bernd Edlinger wrote: >> >> On Tue, 3 Sep 2013 12:31:50, Richard Biener wrote: >>> On Fri

[PING] [PATCH] PR58143/58227 wrong code at -O3

2013-09-16 Thread Bernd Edlinger
ping... On Wed, 4 Sep 2013 18:45:39, Bernd Edlinger wrote: > > On Tue, 3 Sep 2013 12:31:50, Richard Biener wrote: >> On Fri, Aug 30, 2013 at 6:43 PM, Bernd Edlinger >> wrote: >>> Now I think this is good opportunity for a simple heuristic: >>> >>> If a statement is at loop level 1 we can move it

RE: [PATCH] PR58143/58227 wrong code at -O3

2013-09-04 Thread Bernd Edlinger
On Tue, 3 Sep 2013 12:31:50, Richard Biener wrote: > On Fri, Aug 30, 2013 at 6:43 PM, Bernd Edlinger > wrote: >> Now I think this is good opportunity for a simple heuristic: >> >> If a statement is at loop level 1 we can move it out of the loop, >> regardless of the fact, that it may invoke undefi

Re: [PATCH] PR58143/58227 wrong code at -O3

2013-09-03 Thread Richard Biener
On Fri, Aug 30, 2013 at 6:43 PM, Bernd Edlinger wrote: > On Thu, 29 Aug 2013 11:54:22, Richard Biener wrote: >> On Wed, Aug 28, 2013 at 11:24 PM, Bernd Edlinger >> wrote: >>> The lim pass (aka loop invariant motion) can move conditional expressions >>> with >>> possible undefined behavior out of

RE: [PATCH] PR58143/58227 wrong code at -O3

2013-08-30 Thread Bernd Edlinger
On Thu, 29 Aug 2013 11:54:22, Richard Biener wrote: > On Wed, Aug 28, 2013 at 11:24 PM, Bernd Edlinger > wrote: >> The lim pass (aka loop invariant motion) can move conditional expressions >> with >> possible undefined behavior out of the if statement inside a loop which may >> cause the >> loop

Re: [PATCH] PR58143/58227 wrong code at -O3

2013-08-29 Thread Richard Biener
On Wed, Aug 28, 2013 at 11:24 PM, Bernd Edlinger wrote: > The lim pass (aka loop invariant motion) can move conditional expressions > with possible undefined behavior out of the if statement inside a loop which > may cause the loop optimization to silently generate wrong code as PR > tree-optim

[PATCH] PR58143/58227 wrong code at -O3

2013-08-28 Thread Bernd Edlinger
The lim pass (aka loop invariant motion) can move conditional expressions with possible undefined behavior out of the if statement inside a loop which may cause the loop optimization to silently generate wrong code as PR tree-optimization/58143 and PR tree-optimization/58227 demonstrate. This