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