[llvm-commits] [llvm] r69574 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp

Dan Gohman gohman at apple.com
Wed Apr 22 13:54:18 PDT 2009


On Apr 20, 2009, at 9:16 AM, Sanjiv Gupta wrote:

> Dan Gohman wrote:
>> Hello,
>>
>> Are you planning to resubmit r58505?  It was reverted in r58547 with
>> a message indicating that it would be resubmitted.  That patch would
>> appear to make this r69574 unnecessary.
>>
>> Dan
>>
>>
> Right. Even after that this change will still hold good just in case  
> if
> a pointer size doesn't make valid index.

If Instcombine isn't using a valid index type for this optimization
for some target, it really should be fixed. Silently falling back to
not doing this may just be hiding problems.

>
> Chris had suggested that 58505 alone is not enough as the bc encoding
> uses 1 bit to encode i32/i64 for index types.
> He had suggested that we should be able to write i16 type indexes and
> should be able to get back them by the command seq below.
>  $ llvm-as < test.ll | llvm-dis | llvm-as | llvm-dis
>
> When I tried this with 58505, it worked.
> So the only additional thing is that we  probably need to do the  
> changes
> in the documentation.
>
> Let me know if this understanding is incorrect. Better you can get  
> me a
> test case.

I'm not very familiar with the bitcode encoding, but at a quick
glance it looks like a full type is stored with each operand.
If this just needs a documentation update, please do that and
re-apply 58505.

Thanks,

Dan




More information about the llvm-commits mailing list