[PATCH] D16454: [mips][microMIPS] Add CodeGen support for ADD, ADDIU*, ADDU* and DADD* instructions

Simon Dardis via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 03:54:47 PDT 2016


sdardis added a subscriber: sdardis.
sdardis added a comment.

Post commit comments:

I noticed that MipsSEDAGToDAGISel::selectNode(SDNode *Node) performs the expansion of ISD::ADDE. Unfortunately the logic there was not extended to cover microMIPS:

  case ISD::ADDE: {
    if (Subtarget->hasDSP()) // Select DSP instructions, ADDSC and ADDWC.
      break;
    SDValue InFlag = Node->getOperand(2);
    unsigned Opc = Subtarget->isGP64bit() ? Mips::DADDu : Mips::ADDu; // Here
    Result = selectAddESubE(Opc, InFlag, InFlag.getValue(0), DL, Node);
    return std::make_pair(true, Result);
  }
   

microMIPSR6 re-encodes 'addu', so I believe direct object emission may be broken.


Repository:
  rL LLVM

http://reviews.llvm.org/D16454





More information about the llvm-commits mailing list