Before this change LLVM emits non-microMIPS variant of the mov.d command for microMIPS code.
FMOV_D64_MM cannot be selected. Maybe you can do the following change instead in file
else if (Mips::FGR64RegClass.contains(DestReg, SrcReg)) Opc = isMicroMips ? Mips::FMOV_D64_MM : Mips::FMOV_D64;
- Select microMIPS R6 variant of the mov.d instruction in the MipsSEInstrInfo::copyPhysReg method.
BTW this variant requires less changes in the source code but I'm concerned a bit that almost all other instructions handled in the MipsSEInstrInfo::copyPhysReg are mapped to their microMIPS counterparts by mappings in the td files.
microMIPS r6 handles float move with FMOV_S_MMR6 instruction mappings in .td file, with that in mind we should do the same with the double move instruction.
Despite the fact that change in /lib/Target/Mips/MipsSEInstrInfo.cpp results in the same output for this test, it should be addressed in another patch. Goal of that patch would be to properly select microMIPS move instruction based on register class used in copy instruction.