[llvm-commits] [llvm] r61980 - in /llvm/trunk:	lib/Transforms/Scalar/InstructionCombining.cpp	test/Transforms/InstCombine/bitcast-gep.ll
    Chris Lattner 
    sabre at nondot.org
       
    Sun Jan 11 12:16:56 PST 2009
    
    
  
On Jan 9, 2009, at 11:03 AM, Duncan Sands wrote:
> Hi Chris,
>
>>>> +  // is something like [0 x {int, int}]
>>>
>>> if the type size is zero, I don't see how you can do anything unless
>>> Offset is zero.  So how about handling the zero size case entirely
>>> here and bailing out?
>>
>> Consider trying to get to offset 4 in this.  It will form a gep 0, 0,
>> 1.  Just because the array has size zero it doesn't mean its elements
>> have size 0.
>
> It seems rather weird that if you declare an object of type
> [0 x {int, int}] then a GEP 0, 0, 1 will point outside the
> object...
Yes, this is all silly.  I just committed another patch, please see if  
it makes more sense!
-Chris
    
    
More information about the llvm-commits
mailing list