[LLVMdev] getMinimalPhysRegClass
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon May 14 14:25:50 PDT 2012
On May 14, 2012, at 1:02 PM, reed kotler wrote:
> I want to introduct a different register class for MIPS 16 but don't
> want it to chose MIPS 16 when
> I'm compiling for MIPS 32.
I bet your problem is here:
if (RC == &Mips::CPURegsRegClass)
Compare to:
if (ARM::GPRRegClass.hasSubClassEq(RC)) {
It is usually wrong to test register class equality. You almost always want hasSubClassEq() instead.
/jakob
More information about the llvm-dev
mailing list