[llvm-commits] [llvm] r103347 - in /llvm/trunk: lib/Transforms/Scalar/GVN.cpp test/Transforms/GVN/2010-05-08-OneBit.ll

Duncan Sands baldrick at free.fr
Sat May 8 13:10:42 PDT 2010


Hi Chris,

> @@ -1132,8 +1132,8 @@
>                                      Instruction *InsertPt, const TargetData&TD){
>     LLVMContext&Ctx = SrcVal->getType()->getContext();
>
> -  uint64_t StoreSize = TD.getTypeSizeInBits(SrcVal->getType())/8;
> -  uint64_t LoadSize = TD.getTypeSizeInBits(LoadTy)/8;
> +  uint64_t StoreSize = (TD.getTypeSizeInBits(SrcVal->getType()) + 7) / 8;

it looks like this should be
   uint64_t StoreSize = TD.getTypeStoreSize(SrcVal->getType());

> +  uint64_t LoadSize = (TD.getTypeSizeInBits(LoadTy) + 7) / 8;

and this
   uint64_t LoadSize = TD.getTypeStoreSize(LoadTy);

Ciao,

Duncan.



More information about the llvm-commits mailing list