expanding i16 operations in presence of an i16 regclass.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

expanding i16 operations in presence of an i16 regclass.

Sanjiv Gupta
Reframing and Reposting my earlier query:
 
My target has 16-bit registers for indirect address of data.
All other registers are 8-bit.
 
Therefore I have added regclasses for i8 and i16 types.
 
All arithmetic operations (including pointer arithmetic ) are 8-bit operations.
 
The problem is that LLVM does not expand i16 operations to i8 operations in presence of i16 regclass.
 
What is the best way to tackle this?
 
Do I need to custom lower arithmetic operations during Legalize using LowerOperation ( )?
 
- Sanjiv

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: expanding i16 operations in presence of an i16 regclass.

Evan Cheng-2

On Feb 28, 2008, at 6:31 AM, Sanjiv Gupta wrote:

> Reframing and Reposting my earlier query:
>
> My target has 16-bit registers for indirect address of data.
> All other registers are 8-bit.
>
> Therefore I have added regclasses for i8 and i16 types.
>
> All arithmetic operations (including pointer arithmetic ) are 8-bit  
> operations.
>
> The problem is that LLVM does not expand i16 operations to i8  
> operations in presence of i16 regclass.
>
> What is the best way to tackle this?
>
> Do I need to custom lower arithmetic operations during Legalize  
> using LowerOperation ( )?

What happens if you mark i16 arithmetic operations expand? i.e.  
setOperationAction(ISD::ADD, MVT::i16, Expand);

Evan

>
> - Sanjiv
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev