Re: A microoptimization of isnegative or greaterthan2millions.

2007-04-10 Thread J.C. Pizarro
10 Apr 2007 10:53:08 -0700, Ian Lance Taylor <[EMAIL PROTECTED]> wrote: As far as I can tell, you are recommending that gcc generate a different code sequence than it currently does. The most helpful approach you can use for such a suggestion is to open a bug report marked as an enhancement. Se

Re: A microoptimization of isnegative or greaterthan2millions.

2007-04-10 Thread Ian Lance Taylor
"J.C. Pizarro" <[EMAIL PROTECTED]> writes: > /* Given X an unsigned of 32 bits, and Y a bool. Try to translate optimizing > * > * Y = X > 2147483647; to Y = ((signed)X) < 0; > * Y = X >= 2147483648; to Y = ((signed)X) < 0; > * > * [ Another optimization is to Y = (X >> 31) ] As far

Re: A microoptimization of isnegative or greaterthan2millions.

2007-04-10 Thread J.C. Pizarro
I'm sorry, i did want to say 2 billions, not 2 millions. J.C. Pizarro

A microoptimization of isnegative or greaterthan2millions.

2007-04-10 Thread J.C. Pizarro
/* Given X an unsigned of 32 bits, and Y a bool. Try to translate optimizing * * Y = X > 2147483647; to Y = ((signed)X) < 0; * Y = X >= 2147483648; to Y = ((signed)X) < 0; * * [ Another optimization is to Y = (X >> 31) ] * * The opposite (ELSE): * * Y = X <= 2147483647; to Y = ((signe