Re: [RFC] Implement load sinking in loops

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 2:32 PM, Richard Guenther wrote: > On Mon, Oct 8, 2012 at 12:38 PM, Eric Botcazou wrote: >> Hi, >> >> we recently noticed that, even at -O3, the compiler doesn't figure out that >> the following loop is dumb: >> >> #define SIZE 64 >> >> int foo (int v[]) >> { >> int r; >>

Re: [RFC] Implement load sinking in loops

2012-10-08 Thread Richard Guenther
On Mon, Oct 8, 2012 at 12:38 PM, Eric Botcazou wrote: > Hi, > > we recently noticed that, even at -O3, the compiler doesn't figure out that > the following loop is dumb: > > #define SIZE 64 > > int foo (int v[]) > { > int r; > > for (i = 0; i < SIZE; i++) > r = v[i]; > > return r; > } >