Hi Susan,<div><br></div><div>Jakob just pointed me to 'MachineOperand::substPhysReg(unsigned preg, const TargetRegisterInfo& TRI)'. That substitutes the given physreg for a virtreg operand, taking the subregister index into account. That is what my examples have been doing manually. Using substPhysReg would allow you to tidy the Gcra code up slightly.</div>
<div><br></div><div>- Lang.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 15, 2012 at 11:21 AM, Lang Hames <span dir="ltr"><<a href="mailto:lhames@gmail.com" target="_blank">lhames@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks Jakob. I should have mentioned that earlier. :)<div><br></div><div>When you see mismatched sizes on operands it's a fair bet that the subreg rewriting has gone wrong. I should have pulled that entirely out of the preg search loop in the previous example.</div>

<div><br></div><div>Fixed version attached.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>- Lang.</div><div><br></div>
</font></span></blockquote></div><br></div>