[LLVMdev] hard values in SequentialType::indexValid () method

Chris Lattner clattner at apple.com
Tue Aug 19 17:36:04 PDT 2008


On Aug 19, 2008, at 4:14 PM, Alireza.Moshtaghi at microchip.com wrote:

>> Two options: 1) change LLVM IR to allow it, or 2) just insert sign/
>> zero extension instructions.
>>
>> Does this actually affect the code being generated in practice?
>
> Inserting sign/zero extension instructions actually do tend to  
> increase
> the generated code pretty dramatically on our target. So I prefer  
> option
> (1)

I realize that sign extensions have non-zero impact when they exist in  
the .s file.  My assertion is that these will be zapped by the dag  
combiner.  Have you actually tried this?

> On x86; but the sign extension does not get eliminated while lowering
> the GEP.

That is because X86 has a 32-bit pointer.  If you have a 16-bit  
pointer, a sign extend from 16 bits to 16 bits will get deleted.

-Chris




More information about the llvm-dev mailing list