Re: [llvm-commits] CVS: llvm/include/llvm/Support/MathExtras.h

2007-03-24 Thread Chris Lattner
On Mar 22, 2007, at 1:18 PM, Reid Spencer wrote: > On Thu, 2007-03-22 at 12:35 -0700, Jeff Cohen wrote: >> How is it any worse than checking for GCC? > > I don't like that either :) FWIW, I don't see anything wrong with Jeff's change. MathExtras may be suboptimal w.r.t to libsystem, but so is

Re: [llvm-commits] CVS: llvm/include/llvm/Support/MathExtras.h

2007-03-22 Thread Reid Spencer
On Thu, 2007-03-22 at 12:35 -0700, Jeff Cohen wrote: > How is it any worse than checking for GCC? I don't like that either :) > > It's treated as an intrinsic when optimizations are enable. It directly > generates a bswap instruction. Same as the conditional code for GCC. Okay, sounds like i

Re: [llvm-commits] CVS: llvm/include/llvm/Support/MathExtras.h

2007-03-22 Thread Jeff Cohen
Reid Spencer wrote: > >> -for (uint64_t Shift = 64 >> 1; Shift; Shift >>= 1) { >> +for (unsigned Shift = 64 >> 1; Shift; Shift >>= 1) { >> > > Why not uint32_t? For conformity with the rest of your changes? The size of a shift amount is unrelated to the size of the function's argumen

Re: [llvm-commits] CVS: llvm/include/llvm/Support/MathExtras.h

2007-03-22 Thread Jeff Cohen
How is it any worse than checking for GCC? It's treated as an intrinsic when optimizations are enable. It directly generates a bswap instruction. Same as the conditional code for GCC. Reid Spencer wrote: > Jeff, > > On Thu, 2007-03-22 at 14:12 -0500, Jeff Cohen wrote: > >> Changes in direct

Re: [llvm-commits] CVS: llvm/include/llvm/Support/MathExtras.h

2007-03-22 Thread Reid Spencer
Jeff, On Thu, 2007-03-22 at 14:12 -0500, Jeff Cohen wrote: > > Changes in directory llvm/include/llvm/Support: > > MathExtras.h updated: 1.43 -> 1.44 > --- > Log message: > > Be more explicit concerning argument sizes. > Use VC++ byteswap intrinsics. ... snip ... > @@ -93,22 +93,30 @@ > >