Home | History | Annotate | Download | only in Mips

Lines Matching refs:Op

543 // Returns Op if setcc is not a floating point comparison.
544 static SDValue createFPCmp(SelectionDAG &DAG, const SDValue &Op) {
546 if (Op.getOpcode() != ISD::SETCC)
547 return Op;
549 SDValue LHS = Op.getOperand(0);
552 return Op;
554 SDValue RHS = Op.getOperand(1);
555 SDLoc DL(Op);
559 ISD::CondCode CC = cast<CondCodeSDNode>(Op.getOperand(2))->get();
694 // Op's first operand must be a shift right.
706 // Op's second operand must be a shifted mask.
738 // See if Op's first operand matches (and $src1 , mask0).
746 // See if Op's second operand matches (and (shl $src, pos), mask1).
892 LowerOperation(SDValue Op, SelectionDAG &DAG) const
894 switch (Op.getOpcode())
896 case ISD::BR_JT: return lowerBR_JT(Op, DAG);
897 case ISD::BRCOND: return lowerBRCOND(Op, DAG);
898 case ISD::ConstantPool: return lowerConstantPool(Op, DAG);
899 case ISD::GlobalAddress: return lowerGlobalAddress(Op, DAG);
900 case ISD::BlockAddress: return lowerBlockAddress(Op, DAG);
901 case ISD::GlobalTLSAddress: return lowerGlobalTLSAddress(Op, DAG);
902 case ISD::JumpTable: return lowerJumpTable(Op, DAG);
903 case ISD::SELECT: return lowerSELECT(Op, DAG);
904 case ISD::SETCC: return lowerSETCC(Op, DAG);
905 case ISD::VASTART: return lowerVASTART(Op, DAG);
906 case ISD::VAARG: return lowerVAARG(Op, DAG);
907 case ISD::FCOPYSIGN: return lowerFCOPYSIGN(Op, DAG);
908 case ISD::FRAMEADDR: return lowerFRAMEADDR(Op, DAG);
909 case ISD::RETURNADDR: return lowerRETURNADDR(Op, DAG);
910 case ISD::EH_RETURN: return lowerEH_RETURN(Op, DAG);
911 case ISD::ATOMIC_FENCE: return lowerATOMIC_FENCE(Op, DAG);
912 case ISD::SHL_PARTS: return lowerShiftLeftParts(Op, DAG);
913 case ISD::SRA_PARTS: return lowerShiftRightParts(Op, DAG, true);
914 case ISD::SRL_PARTS: return lowerShiftRightParts(Op, DAG, false);
915 case ISD::LOAD: return lowerLOAD(Op, DAG);
916 case ISD::STORE: return lowerSTORE(Op, DAG);
917 case ISD::ADD: return lowerADD(Op, DAG);
918 case ISD::FP_TO_SINT: return lowerFP_TO_SINT(Op, DAG);
1665 SDValue MipsTargetLowering::lowerBR_JT(SDValue Op, SelectionDAG &DAG) const {
1666 SDValue Chain = Op.getOperand(0);
1667 SDValue Table = Op.getOperand(1);
1668 SDValue Index = Op.getOperand(2);
1669 SDLoc DL(Op);
1697 SDValue MipsTargetLowering::lowerBRCOND(SDValue Op, SelectionDAG &DAG) const {
1700 SDValue Chain = Op.getOperand(0);
1701 SDValue Dest = Op.getOperand(2);
1702 SDLoc DL(Op);
1705 SDValue CondRes = createFPCmp(DAG, Op.getOperand(1));
1709 return Op;
1717 return DAG.getNode(MipsISD::FPBrcond, DL, Op.getValueType(), Chain, BrCode,
1722 lowerSELECT(SDValue Op, SelectionDAG &DAG) const
1725 SDValue Cond = createFPCmp(DAG, Op.getOperand(0));
1729 return Op;
1731 return createCMovFP(DAG, Cond, Op.getOperand(1), Op.getOperand(2),
1732 SDLoc(Op));
1735 SDValue MipsTargetLowering::lowerSETCC(SDValue Op, SelectionDAG &DAG) const {
1737 SDValue Cond = createFPCmp(DAG, Op);
1742 SDLoc DL(Op);
1749 SDValue MipsTargetLowering::lowerGlobalAddress(SDValue Op,
1751 EVT Ty = Op.getValueType();
1752 GlobalAddressSDNode *N = cast<GlobalAddressSDNode>(Op);
1793 SDValue MipsTargetLowering::lowerBlockAddress(SDValue Op,
1795 BlockAddressSDNode *N = cast<BlockAddressSDNode>(Op);
1796 EVT Ty = Op.getValueType();
1805 lowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const
1811 GlobalAddressSDNode *GA = cast<GlobalAddressSDNode>(Op);
1887 lowerJumpTable(SDValue Op, SelectionDAG &DAG) const
1889 JumpTableSDNode *N = cast<JumpTableSDNode>(Op);
1890 EVT Ty = Op.getValueType();
1899 lowerConstantPool(SDValue Op, SelectionDAG &DAG) const
1901 ConstantPoolSDNode *N = cast<ConstantPoolSDNode>(Op);
1902 EVT Ty = Op.getValueType();
1920 SDValue MipsTargetLowering::lowerVASTART(SDValue Op, SelectionDAG &DAG) const {
1924 SDLoc DL(Op);
1930 const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
1931 return DAG.getStore(Op.getOperand(0), DL, FI, Op.getOperand(1),
1935 SDValue MipsTargetLowering::lowerVAARG(SDValue Op, SelectionDAG &DAG) const {
1936 SDNode *Node = Op.getNode();
1995 static SDValue lowerFCOPYSIGN32(SDValue Op, SelectionDAG &DAG,
1997 EVT TyX = Op.getOperand(0).getValueType();
1998 EVT TyY = Op.getOperand(1).getValueType();
1999 SDLoc DL(Op);
2007 DAG.getNode(ISD::BITCAST, DL, MVT::i32, Op.getOperand(0)) :
2008 DAG.getNode(MipsISD::ExtractElementF64, DL, MVT::i32, Op.getOperand(0),
2011 DAG.getNode(ISD::BITCAST, DL, MVT::i32, Op.getOperand(1)) :
2012 DAG.getNode(MipsISD::ExtractElementF64, DL, MVT::i32, Op.getOperand(1),
2034 return DAG.getNode(ISD::BITCAST, DL, Op.getOperand(0).getValueType(), Res);
2037 Op.getOperand(0),
2042 static SDValue lowerFCOPYSIGN64(SDValue Op
2044 unsigned WidthX = Op.getOperand(0).getValueSizeInBits();
2045 unsigned WidthY = Op.getOperand(1).getValueSizeInBits();
2047 SDLoc DL(Op);
2051 SDValue X = DAG.getNode(ISD::BITCAST, DL, TyX, Op.getOperand(0));
2052 SDValue Y = DAG.getNode(ISD::BITCAST, DL, TyY, Op.getOperand(1));
2068 return DAG.getNode(ISD::BITCAST, DL, Op.getOperand(0).getValueType(), I);
2089 return DAG.getNode(ISD::BITCAST, DL, Op.getOperand(0).getValueType(), Or);
2093 MipsTargetLowering::lowerFCOPYSIGN(SDValue Op, SelectionDAG &DAG) const {
2095 return lowerFCOPYSIGN64(Op, DAG, Subtarget.hasExtractInsert());
2097 return lowerFCOPYSIGN32(Op, DAG, Subtarget.hasExtractInsert());
2101 lowerFRAMEADDR(SDValue Op, SelectionDAG &DAG) const {
2103 assert((cast<ConstantSDNode>(Op.getOperand(0))->getZExtValue() == 0) &&
2108 EVT VT = Op.getValueType();
2109 SDLoc DL(Op);
2115 SDValue MipsTargetLowering::lowerRETURNADDR(SDValue Op,
2117 if (verifyReturnAddressArgumentIsConstant(Op, DAG))
2121 assert((cast<ConstantSDNode>(Op.getOperand(0))->getZExtValue() == 0) &&
2126 MVT VT = Op.getSimpleValueType();
2132 return DAG.getCopyFromReg(DAG.getEntryNode(), SDLoc(Op), Reg, VT);
2139 SDValue MipsTargetLowering::lowerEH_RETURN(SDValue Op, SelectionDAG &DAG)
2145 SDValue Chain = Op.getOperand(0);
2146 SDValue Offset = Op.getOperand(1);
2147 SDValue Handler = Op.getOperand(2);
2148 SDLoc DL(Op);
2163 SDValue MipsTargetLowering::lowerATOMIC_FENCE(SDValue Op,
2168 SDLoc DL(Op);
2169 return DAG.getNode(MipsISD::Sync, DL, MVT::Other, Op.getOperand(0),
2173 SDValue MipsTargetLowering::lowerShiftLeftParts(SDValue Op,
2175 SDLoc DL(Op);
2178 SDValue Lo = Op.getOperand(0), Hi = Op.getOperand(1);
2179 SDValue Shamt = Op.getOperand(2);
2204 SDValue MipsTargetLowering::lowerShiftRightParts(SDValue Op, SelectionDAG &DAG,
2206 SDLoc DL(Op);
2207 SDValue Lo = Op.getOperand(0), Hi = Op.getOperand(1);
2208 SDValue Shamt = Op.getOperand(2);
2263 SDValue MipsTargetLowering::lowerLOAD(SDValue Op, SelectionDAG &DAG) const {
2264 LoadSDNode *LD = cast<LoadSDNode>(Op);
2268 return Op;
2276 EVT VT = Op.getValueType();
2388 SDValue MipsTargetLowering::lowerSTORE(SDValue Op, SelectionDAG &DAG) const {
2389 StoreSDNode *SD = cast<StoreSDNode>(Op);
2401 SDValue MipsTargetLowering::lowerADD(SDValue Op, SelectionDAG &DAG) const {
2402 if (Op->getOperand(0).getOpcode() != ISD::FRAMEADDR
2404 (Op->getOperand(0).getOperand(0))->getZExtValue() != 0
2405 || Op->getOperand(1).getOpcode() != ISD::FRAME_TO_ARGS_OFFSET)
2415 EVT ValTy = Op->getValueType(0);
2416 int FI = MFI->CreateFixedObject(Op.getValueSizeInBits() / 8, 0, false);
2418 SDLoc DL(Op);
2423 SDValue MipsTargetLowering::lowerFP_TO_SINT(SDValue Op,
2425 EVT FPTy = EVT::getFloatingPointVT(Op.getValueSizeInBits());
2426 SDValue Trunc = DAG.getNode(MipsISD::TruncIntFP, SDLoc(Op), FPTy,
2427 Op.getOperand(0));
2428 return DAG.getNode(ISD::BITCAST, SDLoc(Op), Op.getValueType(), Trunc);
3569 void MipsTargetLowering::LowerAsmOperandForConstraint(SDValue Op,
3573 SDLoc DL(Op);
3584 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
3585 EVT Type = Op.getValueType();
3594 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
3595 EVT Type = Op.getValueType();
3604 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
3605 EVT Type = Op.getValueType();
3614 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
3615 EVT Type = Op.getValueType();
3624 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
3625 EVT Type = Op.getValueType();
3634 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
3635 EVT Type = Op.getValueType();
3644 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
3645 EVT Type = Op.getValueType();
3660 TargetLowering::LowerAsmOperandForConstraint(Op, Constraint, Ops, DAG);