<div dir="ltr"><div>This code or subtle variations of it appears in multiple targets. It tries to convert from a register to a register class using getRegClass, but getRegClass is really supposed to take a register class enum value and get the register class object for it. It doesn't convert a register to a class. In fact there's not always a single or canonical class for a given register.</div><div><br></div><div>What is the right way to do this?</div><div><br></div><div><div>    unsigned SrcReg = Reg + VA.getValNo();</div><div>    unsigned DestReg = VA.getLocReg();</div><div>    // Avoid a cross-class copy. This is very unlikely.</div><div>    if (!MRI.getRegClass(SrcReg)->contains(DestReg))</div><div>      return false;</div></div><div><br></div><br clear="all"><div><div class="gmail_signature">~Craig</div></div>
</div>