Re: [Cbe-oss-dev] [PATCH 1/3] Fix Unlikely(x) == y

2008-02-18 Thread Andrew Pinski
On Feb 18, 2008 6:01 AM, Geert Uytterhoeven <[EMAIL PROTECTED]> wrote: > > This means it generates faster code with a current gcc for your platform. > > > > But a future gcc might e.g. replace the whole loop with a division > > (gcc SVN head (that will soon become gcc 4.3) already does > >

Re: [Cbe-oss-dev] [PATCH 1/3] Fix Unlikely(x) == y

2008-02-18 Thread Andrew Pinski
On Feb 18, 2008 6:01 AM, Geert Uytterhoeven [EMAIL PROTECTED] wrote: This means it generates faster code with a current gcc for your platform. But a future gcc might e.g. replace the whole loop with a division (gcc SVN head (that will soon become gcc 4.3) already does transformations

Re: [Cbe-oss-dev] [PATCH 1/3] Fix Unlikely(x) == y

2008-02-17 Thread Willy Tarreau
On Sun, Feb 17, 2008 at 01:45:23AM -0800, Andrew Pinski wrote: > On Feb 16, 2008 9:58 AM, Willy Tarreau <[EMAIL PROTECTED]> wrote: > > Last but not least, gcc 4 tends to emit stupid checks, to the point that I > > have replaced unlikely(x) with (x) in my code when gcc >= 4 is detected. > > What >

Re: [Cbe-oss-dev] [PATCH 1/3] Fix Unlikely(x) == y

2008-02-17 Thread Andrew Pinski
On Feb 16, 2008 9:58 AM, Willy Tarreau <[EMAIL PROTECTED]> wrote: > Last but not least, gcc 4 tends to emit stupid checks, to the point that I > have replaced unlikely(x) with (x) in my code when gcc >= 4 is detected. What > I observe is that the following code : > > if (unlikely(p == NULL))

Re: [Cbe-oss-dev] [PATCH 1/3] Fix Unlikely(x) == y

2008-02-17 Thread Andrew Pinski
On Feb 16, 2008 9:58 AM, Willy Tarreau [EMAIL PROTECTED] wrote: Last but not least, gcc 4 tends to emit stupid checks, to the point that I have replaced unlikely(x) with (x) in my code when gcc = 4 is detected. What I observe is that the following code : if (unlikely(p == NULL)) ...

Re: [Cbe-oss-dev] [PATCH 1/3] Fix Unlikely(x) == y

2008-02-17 Thread Willy Tarreau
On Sun, Feb 17, 2008 at 01:45:23AM -0800, Andrew Pinski wrote: On Feb 16, 2008 9:58 AM, Willy Tarreau [EMAIL PROTECTED] wrote: Last but not least, gcc 4 tends to emit stupid checks, to the point that I have replaced unlikely(x) with (x) in my code when gcc = 4 is detected. What I observe