[llvm-commits] [llvm] r103347 - in /llvm/trunk:	lib/Transforms/Scalar/GVN.cpp	test/Transforms/GVN/2010-05-08-OneBit.ll
    Eli Friedman 
    eli.friedman at gmail.com
       
    Sat May  8 14:09:01 PDT 2010
    
    
  
On Sat, May 8, 2010 at 1:19 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On May 8, 2010, at 1:10 PM, Duncan Sands wrote:
>
>> 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);
>
> I wasn't comfortable changing that without a testcase.  LoadSize should be the non-memory size I think, as in the other case, which has a testcase.
Umm, the suggested change is purely syntactic... I don't think a
testcase is necessary.
-Eli
    
    
More information about the llvm-commits
mailing list