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