[PATCH] D35561: [mips] Insert a COPY node for SW16_MM

Simon Dardis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 25 06:06:06 PDT 2017


sdardis added a comment.

I think the approach here is incorrect, as this patch is solving a very specific case when the bug is more general.

During the instruction emission of SDNodes to MachineInstrs, InstrEmitter::AddOperand() fails to account 
for handling register operands whose register class differs from the instruction definition.

Normally the initial register class for an incoming register operand is chosen based on the value type it
holds, which in this case is GPR32. The problematic SW16_MM however takes a GPRMM16Zero register
operand.

Can you look at modifying MachineInstrs, InstrEmitter::AddOperand() to use AddRegisterOperand in the
case of RegisterSDNodes?

Thanks,
Simon


https://reviews.llvm.org/D35561





More information about the llvm-commits mailing list