[llvm-commits] [llvm] r66366 - in /llvm/trunk: lib/Transforms/Scalar/ScalarReplAggregates.cpp test/Transforms/ScalarRepl/2008-06-22-LargeArray.ll test/Transforms/ScalarRepl/vector_memcpy.ll

Duncan Sands baldrick at free.fr
Sun Mar 8 12:52:47 PDT 2009


Hi Chris,

> You just get a trapping NaN in a register.  If you did an fadd on it  
> you would get a trap.

see also PR2680.

> >> This is converting a memcpy to a load/store of the same size, so it
> >> must be a multiple of a byte in size.
> >
> > How is the size measured?  By getTypeSizeInBits,  
> > getTypeStoreSizeInBits
> > or getTypePaddedSizeInBits?  The first one is ok, the others not.
> 
> Padded Size.  Why do you think it isn't safe?  Have an example?

Sure, consider an i24.  The padded size is 32 bits.  A memcpy will
copy 32 bits, a load/store will copy 24 bits.  Consider x86 long
double.  This is 80 bits long, but the padded size is at least 96
bits.  A load/store copies only 80 bits.

Ciao,

Duncan.



More information about the llvm-commits mailing list