[LLVMdev] Adding multiples-of-8 integer types to MVT

Ken Dyck Ken.Dyck at onsemi.com
Sat Dec 12 06:58:42 PST 2009


 

On Saturday, December 12, 2009 2:43 AM, Duncan Sands wrote:
> 
> > What would do you think of modifying case (3) slightly as follows?
> 
> I suggest the following scheme:
> 
> (3) Suppose T is larger than the largest legal type.  Look at 
> all the legal types LT for which
>    bitwidth T <= 2 * bitwidth of LT
> If there is one, take the smallest one (SLT) and promote T to 2*SLT.
> If there are none (because bitwidth T is too big), look at 
> all the legal types LT for which
>    bitwidth T <= 4 * bitwidth of LT
> If there is one, take the smallest one (SLT) and promote T to 4*SLT.
> Continue with 8*, 16* etc.

This is actually exactly what I was proposing. Apparently I didn't
express it clearly enough, though. I'm glad to see that we agree,
anyways.

-Ken




More information about the llvm-dev mailing list