Lines Matching refs:Op
1498 for (unsigned Op = 0; Op < ISD::BUILTIN_OP_END; ++Op) {
1499 setOperationAction(Op, MVT::v2i32, Expand);
1881 /// isMaskedValueZeroForTargetNode - Return true if 'Op & Mask' is known to
1882 /// be zero. Op is expected to be a target specific node. Used by DAG
1885 (const SDValue Op,
1893 switch (Op.getOpcode()) {
1898 DAG.computeKnownBits(Op.getOperand(1), KnownZero, KnownOne, Depth+1);
1899 DAG.computeKnownBits(Op.getOperand(0), KnownZero2, KnownOne2, Depth+1);
1929 SDValue SparcTargetLowering::withTargetFlags(SDValue Op, unsigned TF,
1931 if (const GlobalAddressSDNode *GA = dyn_cast<GlobalAddressSDNode>(Op))
1937 if (const ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(Op))
1943 if (const BlockAddressSDNode *BA = dyn_cast<BlockAddressSDNode>(Op))
1945 Op.getValueType(),
1949 if (const ExternalSymbolSDNode *ES = dyn_cast<ExternalSymbolSDNode>(Op))
1956 // Split Op into high and low parts according to HiTF and LoTF.
1958 SDValue SparcTargetLowering::makeHiLoPair(SDValue Op,
1961 SDLoc DL(Op);
1962 EVT VT = Op.getValueType();
1963 SDValue Hi = DAG.getNode(SPISD::Hi, DL, VT, withTargetFlags(Op, HiTF, DAG));
1964 SDValue Lo = DAG.getNode(SPISD::Lo, DL, VT, withTargetFlags(Op, LoTF, DAG));
1970 SDValue SparcTargetLowering::makeAddress(SDValue Op, SelectionDAG &DAG) const {
1971 SDLoc DL(Op);
1977 SDValue HiLo = makeHiLoPair(Op, SparcMCExpr::VK_Sparc_GOT22,
1996 return makeHiLoPair(Op, SparcMCExpr::VK_Sparc_HI,
2000 SDValue H44 = makeHiLoPair(Op, SparcMCExpr::VK_Sparc_H44,
2003 SDValue L44 = withTargetFlags(Op, SparcMCExpr::VK_Sparc_L44, DAG);
2009 SDValue Hi = makeHiLoPair(Op, SparcMCExpr::VK_Sparc_HH,
2012 SDValue Lo = makeHiLoPair(Op, SparcMCExpr::VK_Sparc_HI,
2019 SDValue SparcTargetLowering::LowerGlobalAddress(SDValue Op,
2021 return makeAddress(Op, DAG);
2024 SDValue SparcTargetLowering::LowerConstantPool(SDValue Op,
2026 return makeAddress(Op, DAG);
2029 SDValue SparcTargetLowering::LowerBlockAddress(SDValue Op,
2031 return makeAddress(Op, DAG);
2034 SDValue SparcTargetLowering::LowerGlobalTLSAddress(SDValue Op,
2037 GlobalAddressSDNode *GA = cast<GlobalAddressSDNode>(Op);
2061 SDValue HiLo = makeHiLoPair(Op, HiTF, LoTF, DAG);
2064 withTargetFlags(Op, addTF, DAG));
2073 SDValue Symbol = withTargetFlags(Op, callTF, DAG);
2096 withTargetFlags(Op, SparcMCExpr::VK_Sparc_TLS_LDO_HIX22, DAG));
2098 withTargetFlags(Op, SparcMCExpr::VK_Sparc_TLS_LDO_LOX10, DAG));
2101 withTargetFlags(Op, SparcMCExpr::VK_Sparc_TLS_LDO_ADD, DAG));
2115 SDValue TGA = makeHiLoPair(Op,
2121 withTargetFlags(Op, ldTF, DAG));
2124 withTargetFlags(Op,
2130 withTargetFlags(Op, SparcMCExpr::VK_Sparc_TLS_LE_HIX22, DAG));
2132 withTargetFlags(Op, SparcMCExpr::VK_Sparc_TLS_LE_LOX10, DAG));
2172 SparcTargetLowering::LowerF128Op(SDValue Op, SelectionDAG &DAG,
2182 Type *RetTy = Op.getValueType().getTypeForEVT(*DAG.getContext());
2201 assert(Op->getNumOperands() >= numArgs && "Not enough operands!");
2203 Chain = LowerF128_LibCallArg(Chain, Args, Op.getOperand(i), SDLoc(Op), DAG);
2206 CLI.setDebugLoc(SDLoc(Op)).setChain(Chain)
2220 return DAG.getLoad(Op.getValueType(),
2221 SDLoc(Op),
2326 LowerF128_FPEXTEND(SDValue Op, SelectionDAG &DAG,
2329 if (Op.getOperand(0).getValueType() == MVT::f64)
2330 return TLI.LowerF128Op(Op, DAG,
2333 if (Op.getOperand(0).getValueType() == MVT::f32)
2334 return TLI.LowerF128Op(Op, DAG,
2342 LowerF128_FPROUND(SDValue Op, SelectionDAG &DAG,
2345 if (Op.getOperand(0).getValueType() != MVT::f128)
2346 return Op;
2348 if (Op.getValueType() == MVT::f64)
2349 return TLI.LowerF128Op(Op, DAG,
2351 if (Op.getValueType() == MVT::f32)
2352 return TLI.LowerF128Op(Op, DAG,
2359 static SDValue LowerFP_TO_SINT(SDValue Op, SelectionDAG &DAG,
2362 SDLoc dl(Op);
2363 EVT VT = Op.getValueType();
2367 if (Op.getOperand(0).getValueType() == MVT::f128
2372 return TLI.LowerF128Op(Op, DAG, libName, 1);
2381 Op = DAG.getNode(SPISD::FTOI, dl, MVT::f32, Op.getOperand(0));
2383 Op = DAG.getNode(SPISD::FTOX, dl, MVT::f64, Op.getOperand(0));
2385 return DAG.getNode(ISD::BITCAST, dl, VT, Op);
2388 static SDValue LowerSINT_TO_FP(SDValue Op, SelectionDAG &DAG,
2391 SDLoc dl(Op);
2392 EVT OpVT = Op.getOperand(0).getValueType();
2398 if (Op.getValueType() == MVT::f128
2403 return TLI.LowerF128Op(Op, DAG, libName, 1);
2411 SDValue Tmp = DAG.getNode(ISD::BITCAST, dl, floatVT, Op.getOperand(0));
2413 return DAG.getNode(opcode, dl, Op.getValueType(), Tmp);
2416 static SDValue LowerFP_TO_UINT(SDValue Op, SelectionDAG &DAG,
2419 SDLoc dl(Op);
2420 EVT VT = Op.getValueType();
2424 if (Op.getOperand(0).getValueType() != MVT::f128 ||
2430 return TLI.LowerF128Op(Op, DAG,
2437 static SDValue LowerUINT_TO_FP(SDValue Op, SelectionDAG &DAG,
2440 SDLoc dl(Op);
2441 EVT OpVT = Op.getOperand(0).getValueType();
2446 if (Op.getValueType() != MVT::f128 || (hasHardQuad && TLI.isTypeLegal(OpVT)))
2449 return TLI.LowerF128Op(Op, DAG,
2456 static SDValue LowerBR_CC(SDValue Op, SelectionDAG &DAG,
2459 SDValue Chain = Op.getOperand(0);
2460 ISD::CondCode CC = cast<CondCodeSDNode>(Op.getOperand(1))->get();
2461 SDValue LHS = Op.getOperand(2);
2462 SDValue RHS = Op.getOperand(3);
2463 SDValue Dest = Op.getOperand(4);
2464 SDLoc dl(Op);
2493 static SDValue LowerSELECT_CC(SDValue Op, SelectionDAG &DAG,
2496 SDValue LHS = Op.getOperand(0);
2497 SDValue RHS = Op.getOperand(1);
2498 ISD::CondCode CC = cast<CondCodeSDNode>(Op.getOperand(4))->get();
2499 SDValue TrueVal = Op.getOperand(2);
2500 SDValue FalseVal = Op.getOperand(3);
2501 SDLoc dl(Op);
2529 SDValue SparcTargetLowering::LowerEH_SJLJ_SETJMP(SDValue Op, SelectionDAG &DAG,
2531 SDLoc DL(Op);
2533 DAG.getVTList(MVT::i32, MVT::Other), Op.getOperand(0), Op.getOperand(1));
2537 SDValue SparcTargetLowering::LowerEH_SJLJ_LONGJMP(SDValue Op, SelectionDAG &DAG,
2539 SDLoc DL(Op);
2540 return DAG.getNode(SPISD::EH_SJLJ_LONGJMP, DL, MVT::Other, Op.getOperand(0), Op.getOperand(1));
2543 static SDValue LowerVASTART(SDValue Op, SelectionDAG &DAG,
2554 SDLoc DL(Op);
2558 const Value *SV = cast<SrcValueSDNode>(Op.getOperand(2))->getValue();
2559 return DAG.getStore(Op.getOperand(0), DL, Offset, Op.getOperand(1),
2563 static SDValue LowerVAARG(SDValue Op, SelectionDAG &DAG) {
2564 SDNode *Node = Op.getNode();
2587 static SDValue LowerDYNAMIC_STACKALLOC(SDValue Op, SelectionDAG &DAG,
2589 SDValue Chain = Op.getOperand(0); // Legalize the chain.
2590 SDValue Size = Op.getOperand(1); // Legalize the size.
2592 SDLoc dl(Op);
2611 static SDValue getFLUSHW(SDValue Op, SelectionDAG &DAG) {
2612 SDLoc dl(Op);
2618 static SDValue getFRAMEADDR(uint64_t depth, SDValue Op, SelectionDAG &DAG,
2623 EVT VT = Op.getValueType();
2624 SDLoc dl(Op);
2639 SDValue Chain = getFLUSHW(Op, DAG);
2657 static SDValue LowerFRAMEADDR(SDValue Op, SelectionDAG &DAG,
2660 uint64_t depth = Op.getConstantOperandVal(0);
2662 return getFRAMEADDR(depth, Op, DAG, Subtarget);
2665 static SDValue LowerRETURNADDR(SDValue Op, SelectionDAG &DAG,
2672 if (TLI.verifyReturnAddressArgumentIsConstant(Op, DAG))
2675 EVT VT = Op.getValueType();
2676 SDLoc dl(Op);
2677 uint64_t depth = Op.getConstantOperandVal(0);
2688 SDValue FrameAddr = getFRAMEADDR(depth - 1, Op, DAG, Subtarget);
2735 static SDValue LowerF128Load(SDValue Op, SelectionDAG &DAG)
2737 SDLoc dl(Op);
2738 LoadSDNode *LdNode = dyn_cast<LoadSDNode>(Op.getNode());
2785 static SDValue LowerLOAD(SDValue Op, SelectionDAG &DAG)
2787 LoadSDNode *LdNode = cast<LoadSDNode>(Op.getNode());
2791 return LowerF128Load(Op, DAG);
2793 return Op;
2797 static SDValue LowerF128Store(SDValue Op, SelectionDAG &DAG) {
2798 SDLoc dl(Op);
2799 StoreSDNode *StNode = dyn_cast<StoreSDNode>(Op.getNode());
2840 static SDValue LowerSTORE(SDValue Op, SelectionDAG &DAG)
2842 SDLoc dl(Op);
2843 StoreSDNode *St = cast<StoreSDNode>(Op.getNode());
2847 return LowerF128Store(Op, DAG);
2863 static SDValue LowerFNEGorFABS(SDValue Op, SelectionDAG &DAG, bool isV9) {
2864 assert((Op.getOpcode() == ISD::FNEG || Op.getOpcode() == ISD::FABS)
2867 SDLoc dl(Op);
2869 if (Op.getValueType() == MVT::f64)
2870 return LowerF64Op(Op.getOperand(0), dl, DAG, Op.getOpcode());
2871 if (Op.getValueType() != MVT::f128)
2872 return Op;
2879 SDValue SrcReg128 = Op.getOperand(0);
2887 Lo64 = DAG.getNode(Op.getOpcode(), dl, MVT::f64, Lo64);
2889 Lo64 = LowerF64Op(Lo64, dl, DAG, Op.getOpcode());
2892 Hi64 = DAG.getNode(Op.getOpcode(), dl, MVT::f64, Hi64);
2894 Hi64 = LowerF64Op(Hi64, dl, DAG, Op.getOpcode());
2906 static SDValue LowerADDC_ADDE_SUBC_SUBE(SDValue Op, SelectionDAG &DAG) {
2908 if (Op.getValueType() != MVT::i64)
2909 return Op;
2911 SDLoc dl(Op);
2912 SDValue Src1 = Op.getOperand(0);
2918 SDValue Src2 = Op.getOperand(1);
2926 unsigned hiOpc = Op.getOpcode();
2927 switch (Op.getOpcode()) {
2937 Lo = DAG.getNode(Op.getOpcode(), dl, VTs, Src1Lo, Src2Lo,
2938 Op.getOperand(2));
2940 Lo = DAG.getNode(Op.getOpcode(), dl, VTs, Src1Lo, Src2Lo);
2957 static SDValue LowerUMULO_SMULO(SDValue Op, SelectionDAG &DAG,
2960 unsigned opcode = Op.getOpcode();
2966 SDLoc dl(Op);
2967 SDValue LHS = Op.getOperand(0);
2970 return Op;
2974 SDValue RHS = Op.getOperand(1);
3003 static SDValue LowerATOMIC_LOAD_STORE(SDValue Op, SelectionDAG &DAG) {
3004 if (isStrongerThanMonotonic(cast<AtomicSDNode>(Op)->getOrdering()))
3009 return Op;
3012 SDValue SparcTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op,
3014 unsigned IntNo = cast<ConstantSDNode>(Op.getOperand(0))->getZExtValue();
3015 SDLoc dl(Op);
3026 LowerOperation(SDValue Op, SelectionDAG &DAG) const {
3031 switch (Op.getOpcode()) {
3034 case ISD::RETURNADDR: return LowerRETURNADDR(Op, DAG, *this,
3036 case ISD::FRAMEADDR: return LowerFRAMEADDR(Op, DAG,
3038 case ISD::GlobalTLSAddress: return LowerGlobalTLSAddress(Op, DAG);
3039 case ISD::GlobalAddress: return LowerGlobalAddress(Op, DAG);
3040 case ISD::BlockAddress: return LowerBlockAddress(Op, DAG);
3041 case ISD::ConstantPool: return LowerConstantPool(Op, DAG);
3042 case ISD::FP_TO_SINT: return LowerFP_TO_SINT(Op, DAG, *this,
3044 case ISD::SINT_TO_FP: return LowerSINT_TO_FP(Op, DAG, *this,
3046 case ISD::FP_TO_UINT: return LowerFP_TO_UINT(Op, DAG, *this,
3048 case ISD::UINT_TO_FP: return LowerUINT_TO_FP(Op, DAG, *this,
3050 case ISD::BR_CC: return LowerBR_CC(Op, DAG, *this,
3052 case ISD::SELECT_CC: return LowerSELECT_CC(Op, DAG, *this,
3054 case ISD::EH_SJLJ_SETJMP: return LowerEH_SJLJ_SETJMP(Op, DAG, *this);
3055 case ISD::EH_SJLJ_LONGJMP: return LowerEH_SJLJ_LONGJMP(Op, DAG, *this);
3056 case ISD::VASTART: return LowerVASTART(Op, DAG, *this);
3057 case ISD::VAARG: return LowerVAARG(Op, DAG);
3058 case ISD::DYNAMIC_STACKALLOC: return LowerDYNAMIC_STACKALLOC(Op, DAG,
3061 case ISD::LOAD: return LowerLOAD(Op, DAG);
3062 case ISD::STORE: return LowerSTORE(Op, DAG);
3063 case ISD::FADD: return LowerF128Op(Op, DAG,
3065 case ISD::FSUB: return LowerF128Op(Op, DAG,
3067 case ISD::FMUL: return LowerF128Op(Op, DAG,
3069 case ISD::FDIV: return LowerF128Op(Op, DAG,
3071 case ISD::FSQRT: return LowerF128Op(Op, DAG,
3074 case ISD::FNEG: return LowerFNEGorFABS(Op, DAG, isV9);
3075 case ISD::FP_EXTEND: return LowerF128_FPEXTEND(Op, DAG, *this);
3076 case ISD::FP_ROUND: return LowerF128_FPROUND(Op, DAG, *this);
3080 case ISD::SUBE: return LowerADDC_ADDE_SUBC_SUBE(Op, DAG);
3082 case ISD::SMULO: return LowerUMULO_SMULO(Op, DAG, *this);
3084 case ISD::ATOMIC_STORE: return LowerATOMIC_LOAD_STORE(Op, DAG);
3085 case ISD::INTRINSIC_WO_CHAIN: return LowerINTRINSIC_WO_CHAIN(Op, DAG);
3421 LowerAsmOperandForConstraint(SDValue Op,
3435 if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Op)) {
3437 Result = DAG.getTargetConstant(C->getSExtValue(), SDLoc(Op),
3438 Op.getValueType());
3449 TargetLowering::LowerAsmOperandForConstraint(Op, Constraint, Ops, DAG);