Re: useless cast blocking some optimization in gcc 4.7.3

2013-04-09 Thread Laurent Alfonsi
I understand, Thanks for your answer. Looking at the standard, I was thinking the example you pointed was undefined. I have created a bugzilla (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56894) to track this big performance regression. My investigations pointed on the scev_const_prop optimiz

Re: useless cast blocking some optimization in gcc 4.7.3

2013-04-09 Thread Richard Biener
On Mon, Apr 8, 2013 at 9:13 PM, Laurent Alfonsi wrote: > Hello, > > I have identified a big performance regression between 4.6 and 4.7. (I have > enclosed a pathological test). > > After investigation, it is because of the += statement applied on 2 signed > chars. > - It is now type-promoted

Re: useless cast blocking some optimization in gcc 4.7.3

2013-04-08 Thread Marc Glisse
Hello, On Mon, 8 Apr 2013, Laurent Alfonsi wrote: I have identified a big performance regression between 4.6 and 4.7. (I have enclosed a pathological test). After investigation, it is because of the += statement applied on 2 signed chars. - It is now type-promoted to "int" when it is writte

useless cast blocking some optimization in gcc 4.7.3

2013-04-08 Thread Laurent Alfonsi
Hello, I have identified a big performance regression between 4.6 and 4.7. (I have enclosed a pathological test). After investigation, it is because of the += statement applied on 2 signed chars. - It is now type-promoted to "int" when it is written "result += foo()".(since 4.7)