Lines Matching refs:SystemZ
90 addRegisterClass(MVT::i32, &SystemZ::GRX32BitRegClass); in SystemZTargetLowering()
92 addRegisterClass(MVT::i32, &SystemZ::GR32BitRegClass); in SystemZTargetLowering()
93 addRegisterClass(MVT::i64, &SystemZ::GR64BitRegClass); in SystemZTargetLowering()
96 addRegisterClass(MVT::f32, &SystemZ::VR32BitRegClass); in SystemZTargetLowering()
97 addRegisterClass(MVT::f64, &SystemZ::VR64BitRegClass); in SystemZTargetLowering()
99 addRegisterClass(MVT::f32, &SystemZ::FP32BitRegClass); in SystemZTargetLowering()
100 addRegisterClass(MVT::f64, &SystemZ::FP64BitRegClass); in SystemZTargetLowering()
103 addRegisterClass(MVT::f128, &SystemZ::VR128BitRegClass); in SystemZTargetLowering()
105 addRegisterClass(MVT::f128, &SystemZ::FP128BitRegClass); in SystemZTargetLowering()
108 addRegisterClass(MVT::v16i8, &SystemZ::VR128BitRegClass); in SystemZTargetLowering()
109 addRegisterClass(MVT::v8i16, &SystemZ::VR128BitRegClass); in SystemZTargetLowering()
110 addRegisterClass(MVT::v4i32, &SystemZ::VR128BitRegClass); in SystemZTargetLowering()
111 addRegisterClass(MVT::v2i64, &SystemZ::VR128BitRegClass); in SystemZTargetLowering()
112 addRegisterClass(MVT::v4f32, &SystemZ::VR128BitRegClass); in SystemZTargetLowering()
113 addRegisterClass(MVT::v2f64, &SystemZ::VR128BitRegClass); in SystemZTargetLowering()
117 addRegisterClass(MVT::i128, &SystemZ::VR128BitRegClass); in SystemZTargetLowering()
802 for (; I < SystemZ::VectorBytes; ++I) { in isVectorConstantLegal()
809 if (I == SystemZ::VectorBytes) { in isVectorConstantLegal()
826 SystemZ::VectorBits / SplatBitSize); in isVectorConstantLegal()
839 SystemZ::VectorBits / SplatBitSize); in isVectorConstantLegal()
868 IntBits <<= (SystemZ::VectorBits - IntImm.getBitWidth()); in SystemZVectorConstantInfo()
1269 return std::make_pair(0U, &SystemZ::GR64BitRegClass); in getRegForInlineAsmConstraint()
1271 return std::make_pair(0U, &SystemZ::GR128BitRegClass); in getRegForInlineAsmConstraint()
1272 return std::make_pair(0U, &SystemZ::GR32BitRegClass); in getRegForInlineAsmConstraint()
1276 return std::make_pair(0U, &SystemZ::ADDR64BitRegClass); in getRegForInlineAsmConstraint()
1278 return std::make_pair(0U, &SystemZ::ADDR128BitRegClass); in getRegForInlineAsmConstraint()
1279 return std::make_pair(0U, &SystemZ::ADDR32BitRegClass); in getRegForInlineAsmConstraint()
1282 return std::make_pair(0U, &SystemZ::GRH32BitRegClass); in getRegForInlineAsmConstraint()
1287 return std::make_pair(0U, &SystemZ::FP64BitRegClass); in getRegForInlineAsmConstraint()
1289 return std::make_pair(0U, &SystemZ::FP128BitRegClass); in getRegForInlineAsmConstraint()
1290 return std::make_pair(0U, &SystemZ::FP32BitRegClass); in getRegForInlineAsmConstraint()
1297 return std::make_pair(0U, &SystemZ::VR32BitRegClass); in getRegForInlineAsmConstraint()
1299 return std::make_pair(0U, &SystemZ::VR64BitRegClass); in getRegForInlineAsmConstraint()
1300 return std::make_pair(0U, &SystemZ::VR128BitRegClass); in getRegForInlineAsmConstraint()
1319 return parseRegisterNumber(Constraint, &SystemZ::GR32BitRegClass, in getRegForInlineAsmConstraint()
1322 return parseRegisterNumber(Constraint, &SystemZ::GR128BitRegClass, in getRegForInlineAsmConstraint()
1324 return parseRegisterNumber(Constraint, &SystemZ::GR64BitRegClass, in getRegForInlineAsmConstraint()
1332 return parseRegisterNumber(Constraint, &SystemZ::FP32BitRegClass, in getRegForInlineAsmConstraint()
1335 return parseRegisterNumber(Constraint, &SystemZ::FP128BitRegClass, in getRegForInlineAsmConstraint()
1337 return parseRegisterNumber(Constraint, &SystemZ::FP64BitRegClass, in getRegForInlineAsmConstraint()
1345 return parseRegisterNumber(Constraint, &SystemZ::VR32BitRegClass, in getRegForInlineAsmConstraint()
1348 return parseRegisterNumber(Constraint, &SystemZ::VR64BitRegClass, in getRegForInlineAsmConstraint()
1350 return parseRegisterNumber(Constraint, &SystemZ::VR128BitRegClass, in getRegForInlineAsmConstraint()
1364 .Case("r4", Subtarget.isTargetXPLINK64() ? SystemZ::R4D : 0) in getRegisterByName()
1365 .Case("r15", Subtarget.isTargetELF() ? SystemZ::R15D : 0) in getRegisterByName()
1375 return Subtarget.isTargetXPLINK64() ? SystemZ::R1D : SystemZ::R6D; in getExceptionPointerRegister()
1380 return Subtarget.isTargetXPLINK64() ? SystemZ::R2D : SystemZ::R7D; in getExceptionSelectorRegister()
1436 static const MCPhysReg ScratchRegs[] = { SystemZ::R0D, SystemZ::R1D, in getScratchRegisters()
1437 SystemZ::R14D, 0 }; in getScratchRegisters()
1529 SDNode *Pair = DAG.getMachineNode(SystemZ::PAIR128, DL, in lowerI128ToGR128()
1536 SDValue Hi = DAG.getTargetExtractSubreg(SystemZ::subreg_h64, in lowerGR128ToI128()
1538 SDValue Lo = DAG.getTargetExtractSubreg(SystemZ::subreg_l64, in lowerGR128ToI128()
1610 RC = &SystemZ::GR32BitRegClass; in LowerFormalArguments()
1614 RC = &SystemZ::GR64BitRegClass; in LowerFormalArguments()
1618 RC = &SystemZ::FP32BitRegClass; in LowerFormalArguments()
1622 RC = &SystemZ::FP64BitRegClass; in LowerFormalArguments()
1626 RC = &SystemZ::FP128BitRegClass; in LowerFormalArguments()
1634 RC = &SystemZ::VR128BitRegClass; in LowerFormalArguments()
1720 -SystemZMC::ELFCallFrameSize + TFL->getRegSpillOffset(MF, SystemZ::R2D) - 16; in LowerFormalArguments()
1726 if (NumFixedFPRs < SystemZ::ELFNumArgFPRs && !useSoftFloat()) { in LowerFormalArguments()
1727 SDValue MemOps[SystemZ::ELFNumArgFPRs]; in LowerFormalArguments()
1728 for (unsigned I = NumFixedFPRs; I < SystemZ::ELFNumArgFPRs; ++I) { in LowerFormalArguments()
1729 unsigned Offset = TFL->getRegSpillOffset(MF, SystemZ::ELFArgFPRs[I]); in LowerFormalArguments()
1733 Register VReg = MF.addLiveIn(SystemZ::ELFArgFPRs[I], in LowerFormalArguments()
1734 &SystemZ::FP64BitRegClass); in LowerFormalArguments()
1742 SystemZ::ELFNumArgFPRs - NumFixedFPRs)); in LowerFormalArguments()
1748 const TargetRegisterClass *RC = &SystemZ::ADDR64BitRegClass; in LowerFormalArguments()
1771 if (Reg == SystemZ::R6H || Reg == SystemZ::R6L || Reg == SystemZ::R6D) in canUseSiblingCall()
1987 RegsToPass.push_back(std::make_pair(SystemZ::R3D, ShadowArgValue)); in LowerCall()
2021 Chain = DAG.getCopyToReg(Chain, DL, SystemZ::R1D, Callee, Glue); in LowerCall()
2023 Callee = DAG.getRegister(SystemZ::R1D, Callee.getValueType()); in LowerCall()
2201 CCValid = SystemZ::CCMASK_TBEGIN; in isIntrinsicWithCCAndChain()
2206 CCValid = SystemZ::CCMASK_TBEGIN; in isIntrinsicWithCCAndChain()
2211 CCValid = SystemZ::CCMASK_TEND; in isIntrinsicWithCCAndChain()
2229 CCValid = SystemZ::CCMASK_VCMP; in isIntrinsicWithCC()
2236 CCValid = SystemZ::CCMASK_VCMP; in isIntrinsicWithCC()
2244 CCValid = SystemZ::CCMASK_VCMP; in isIntrinsicWithCC()
2252 CCValid = SystemZ::CCMASK_VCMP; in isIntrinsicWithCC()
2260 CCValid = SystemZ::CCMASK_VCMP; in isIntrinsicWithCC()
2265 CCValid = SystemZ::CCMASK_VCMP; in isIntrinsicWithCC()
2272 CCValid = SystemZ::CCMASK_ANY; in isIntrinsicWithCC()
2279 CCValid = SystemZ::CCMASK_ANY; in isIntrinsicWithCC()
2286 CCValid = SystemZ::CCMASK_ANY; in isIntrinsicWithCC()
2293 CCValid = SystemZ::CCMASK_ANY; in isIntrinsicWithCC()
2300 CCValid = SystemZ::CCMASK_ANY; in isIntrinsicWithCC()
2307 CCValid = SystemZ::CCMASK_ANY; in isIntrinsicWithCC()
2314 CCValid = SystemZ::CCMASK_0 | SystemZ::CCMASK_3; in isIntrinsicWithCC()
2321 CCValid = SystemZ::CCMASK_ANY; in isIntrinsicWithCC()
2328 CCValid = SystemZ::CCMASK_ANY; in isIntrinsicWithCC()
2335 CCValid = SystemZ::CCMASK_ANY; in isIntrinsicWithCC()
2342 CCValid = SystemZ::CCMASK_ANY; in isIntrinsicWithCC()
2348 CCValid = SystemZ::CCMASK_VCMP; in isIntrinsicWithCC()
2354 CCValid = SystemZ::CCMASK_VCMP; in isIntrinsicWithCC()
2360 CCValid = SystemZ::CCMASK_VCMP; in isIntrinsicWithCC()
2366 CCValid = SystemZ::CCMASK_VCMP; in isIntrinsicWithCC()
2371 CCValid = SystemZ::CCMASK_TDC; in isIntrinsicWithCC()
2420 case ISD::SET##X: return SystemZ::CCMASK_CMP_##X; \ in CCMaskForCondCode()
2421 case ISD::SETO##X: return SystemZ::CCMASK_CMP_##X; \ in CCMaskForCondCode()
2422 case ISD::SETU##X: return SystemZ::CCMASK_CMP_UO | SystemZ::CCMASK_CMP_##X in CCMaskForCondCode()
2435 case ISD::SETO: return SystemZ::CCMASK_CMP_O; in CCMaskForCondCode()
2436 case ISD::SETUO: return SystemZ::CCMASK_CMP_UO; in CCMaskForCondCode()
2452 if ((Value == -1 && C.CCMask == SystemZ::CCMASK_CMP_GT) || in adjustZeroCmp()
2453 (Value == -1 && C.CCMask == SystemZ::CCMASK_CMP_LE) || in adjustZeroCmp()
2454 (Value == 1 && C.CCMask == SystemZ::CCMASK_CMP_LT) || in adjustZeroCmp()
2455 (Value == 1 && C.CCMask == SystemZ::CCMASK_CMP_GE)) { in adjustZeroCmp()
2456 C.CCMask ^= SystemZ::CCMASK_CMP_EQ; in adjustZeroCmp()
2498 if (Value == 0 && C.CCMask == SystemZ::CCMASK_CMP_LT) in adjustSubwordCmp()
2500 Value = 127, C.CCMask = SystemZ::CCMASK_CMP_GT; in adjustSubwordCmp()
2501 else if (Value == 0 && C.CCMask == SystemZ::CCMASK_CMP_GE) in adjustSubwordCmp()
2503 Value = 128, C.CCMask = SystemZ::CCMASK_CMP_LT; in adjustSubwordCmp()
2624 if (C.CCMask == SystemZ::CCMASK_CMP_EQ || in adjustForSubtraction()
2625 C.CCMask == SystemZ::CCMASK_CMP_NE) { in adjustForSubtraction()
2658 C.CCMask = SystemZ::reverseCCMask(C.CCMask); in adjustForFNeg()
2740 if (!SystemZ::isImmLL(Mask) && !SystemZ::isImmLH(Mask) && in getTestUnderMaskCond()
2741 !SystemZ::isImmHL(Mask) && !SystemZ::isImmHH(Mask)) in getTestUnderMaskCond()
2754 if (CCMask == SystemZ::CCMASK_CMP_EQ) in getTestUnderMaskCond()
2755 return SystemZ::CCMASK_TM_ALL_0; in getTestUnderMaskCond()
2756 if (CCMask == SystemZ::CCMASK_CMP_NE) in getTestUnderMaskCond()
2757 return SystemZ::CCMASK_TM_SOME_1; in getTestUnderMaskCond()
2760 if (CCMask == SystemZ::CCMASK_CMP_LT) in getTestUnderMaskCond()
2761 return SystemZ::CCMASK_TM_ALL_0; in getTestUnderMaskCond()
2762 if (CCMask == SystemZ::CCMASK_CMP_GE) in getTestUnderMaskCond()
2763 return SystemZ::CCMASK_TM_SOME_1; in getTestUnderMaskCond()
2766 if (CCMask == SystemZ::CCMASK_CMP_LE) in getTestUnderMaskCond()
2767 return SystemZ::CCMASK_TM_ALL_0; in getTestUnderMaskCond()
2768 if (CCMask == SystemZ::CCMASK_CMP_GT) in getTestUnderMaskCond()
2769 return SystemZ::CCMASK_TM_SOME_1; in getTestUnderMaskCond()
2774 if (CCMask == SystemZ::CCMASK_CMP_EQ) in getTestUnderMaskCond()
2775 return SystemZ::CCMASK_TM_ALL_1; in getTestUnderMaskCond()
2776 if (CCMask == SystemZ::CCMASK_CMP_NE) in getTestUnderMaskCond()
2777 return SystemZ::CCMASK_TM_SOME_0; in getTestUnderMaskCond()
2780 if (CCMask == SystemZ::CCMASK_CMP_GT) in getTestUnderMaskCond()
2781 return SystemZ::CCMASK_TM_ALL_1; in getTestUnderMaskCond()
2782 if (CCMask == SystemZ::CCMASK_CMP_LE) in getTestUnderMaskCond()
2783 return SystemZ::CCMASK_TM_SOME_0; in getTestUnderMaskCond()
2786 if (CCMask == SystemZ::CCMASK_CMP_GE) in getTestUnderMaskCond()
2787 return SystemZ::CCMASK_TM_ALL_1; in getTestUnderMaskCond()
2788 if (CCMask == SystemZ::CCMASK_CMP_LT) in getTestUnderMaskCond()
2789 return SystemZ::CCMASK_TM_SOME_0; in getTestUnderMaskCond()
2794 if (CCMask == SystemZ::CCMASK_CMP_LE) in getTestUnderMaskCond()
2795 return SystemZ::CCMASK_TM_MSB_0; in getTestUnderMaskCond()
2796 if (CCMask == SystemZ::CCMASK_CMP_GT) in getTestUnderMaskCond()
2797 return SystemZ::CCMASK_TM_MSB_1; in getTestUnderMaskCond()
2800 if (CCMask == SystemZ::CCMASK_CMP_LT) in getTestUnderMaskCond()
2801 return SystemZ::CCMASK_TM_MSB_0; in getTestUnderMaskCond()
2802 if (CCMask == SystemZ::CCMASK_CMP_GE) in getTestUnderMaskCond()
2803 return SystemZ::CCMASK_TM_MSB_1; in getTestUnderMaskCond()
2809 if (CCMask == SystemZ::CCMASK_CMP_EQ && CmpVal == Low) in getTestUnderMaskCond()
2810 return SystemZ::CCMASK_TM_MIXED_MSB_0; in getTestUnderMaskCond()
2811 if (CCMask == SystemZ::CCMASK_CMP_NE && CmpVal == Low) in getTestUnderMaskCond()
2812 return SystemZ::CCMASK_TM_MIXED_MSB_0 ^ SystemZ::CCMASK_ANY; in getTestUnderMaskCond()
2813 if (CCMask == SystemZ::CCMASK_CMP_EQ && CmpVal == High) in getTestUnderMaskCond()
2814 return SystemZ::CCMASK_TM_MIXED_MSB_1; in getTestUnderMaskCond()
2815 if (CCMask == SystemZ::CCMASK_CMP_NE && CmpVal == High) in getTestUnderMaskCond()
2816 return SystemZ::CCMASK_TM_MIXED_MSB_1 ^ SystemZ::CCMASK_ANY; in getTestUnderMaskCond()
2831 (C.CCMask == SystemZ::CCMASK_CMP_EQ || in adjustForTestUnderMask()
2832 C.CCMask == SystemZ::CCMASK_CMP_NE)) { in adjustForTestUnderMask()
2838 C.CCValid = SystemZ::CCMASK_VCMP; in adjustForTestUnderMask()
2839 if (C.CCMask == SystemZ::CCMASK_CMP_EQ) in adjustForTestUnderMask()
2840 C.CCMask = SystemZ::CCMASK_VCMP_ALL; in adjustForTestUnderMask()
2842 C.CCMask = SystemZ::CCMASK_VCMP_ALL ^ C.CCValid; in adjustForTestUnderMask()
2870 NewC.CCMask == SystemZ::CCMASK_CMP_EQ || in adjustForTestUnderMask()
2871 NewC.CCMask == SystemZ::CCMASK_CMP_NE || in adjustForTestUnderMask()
2875 if (NewC.CCMask == SystemZ::CCMASK_CMP_LE || in adjustForTestUnderMask()
2876 NewC.CCMask == SystemZ::CCMASK_CMP_GT) { in adjustForTestUnderMask()
2880 NewC.CCMask ^= SystemZ::CCMASK_CMP_EQ; in adjustForTestUnderMask()
2930 C.CCValid = SystemZ::CCMASK_TM; in adjustForTestUnderMask()
2943 if (C.CCMask == SystemZ::CCMASK_CMP_EQ || in adjustICmp128()
2944 C.CCMask == SystemZ::CCMASK_CMP_NE) { in adjustICmp128()
2948 C.CCValid = SystemZ::CCMASK_VCMP; in adjustICmp128()
2949 if (C.CCMask == SystemZ::CCMASK_CMP_EQ) in adjustICmp128()
2950 C.CCMask = SystemZ::CCMASK_VCMP_ALL; in adjustICmp128()
2952 C.CCMask = SystemZ::CCMASK_VCMP_ALL ^ C.CCValid; in adjustICmp128()
2959 case SystemZ::CCMASK_CMP_GT: break; in adjustICmp128()
2960 case SystemZ::CCMASK_CMP_LT: Swap = true; break; in adjustICmp128()
2961 case SystemZ::CCMASK_CMP_LE: Invert = true; break; in adjustICmp128()
2962 case SystemZ::CCMASK_CMP_GE: Swap = Invert = true; break; in adjustICmp128()
2972 C.CCValid = SystemZ::CCMASK_ANY; in adjustICmp128()
2973 C.CCMask = SystemZ::CCMASK_1; in adjustICmp128()
3054 C.CCValid = SystemZ::CCMASK_FCMP; in getCmp()
3064 C.CCValid = SystemZ::CCMASK_ICMP; in getCmp()
3071 if (C.CCMask == SystemZ::CCMASK_CMP_EQ || in getCmp()
3072 C.CCMask == SystemZ::CCMASK_CMP_NE || in getCmp()
3075 else if (C.CCMask & SystemZ::CCMASK_CMP_UO) in getCmp()
3079 C.CCMask &= ~SystemZ::CCMASK_CMP_UO; in getCmp()
3090 C.CCMask = SystemZ::reverseCCMask(C.CCMask); in getCmp()
3117 bool RegisterOnly = (bool(C.CCMask & SystemZ::CCMASK_TM_MIXED_MSB_0) != in emitCmp()
3118 bool(C.CCMask & SystemZ::CCMASK_TM_MIXED_MSB_1)); in emitCmp()
3158 Even = DAG.getTargetExtractSubreg(SystemZ::even128(Is32Bit), DL, VT, Result); in lowerGR128Binary()
3159 Odd = DAG.getTargetExtractSubreg(SystemZ::odd128(Is32Bit), DL, VT, Result); in lowerGR128Binary()
3466 if (C.Opcode == SystemZISD::ICMP && C.CCMask != SystemZ::CCMASK_CMP_EQ && in lowerSELECT_CC()
3467 C.CCMask != SystemZ::CCMASK_CMP_NE && in lowerSELECT_CC()
3472 return getAbsolute(DAG, DL, TrueOp, C.CCMask & SystemZ::CCMASK_CMP_LT); in lowerSELECT_CC()
3474 return getAbsolute(DAG, DL, FalseOp, C.CCMask & SystemZ::CCMASK_CMP_GT); in lowerSELECT_CC()
3550 Chain = DAG.getCopyToReg(Chain, DL, SystemZ::R12D, GOT, Glue); in lowerTLSGetOffset()
3552 Chain = DAG.getCopyToReg(Chain, DL, SystemZ::R2D, GOTOffset, Glue); in lowerTLSGetOffset()
3564 Ops.push_back(DAG.getRegister(SystemZ::R2D, PtrVT)); in lowerTLSGetOffset()
3565 Ops.push_back(DAG.getRegister(SystemZ::R12D, PtrVT)); in lowerTLSGetOffset()
3583 return DAG.getCopyFromReg(Chain, DL, SystemZ::R2D, PtrVT, Glue); in lowerTLSGetOffset()
3592 SDValue TPHi = DAG.getCopyFromReg(Chain, DL, SystemZ::A0, MVT::i32); in lowerThreadPointer()
3596 SDValue TPLo = DAG.getCopyFromReg(Chain, DL, SystemZ::A1, MVT::i32); in lowerThreadPointer()
3800 Register LinkReg = MF.addLiveIn(SystemZ::R14D, &SystemZ::GR64BitRegClass); in lowerRETURNADDR()
3828 In64 = DAG.getTargetInsertSubreg(SystemZ::subreg_h32, DL, in lowerBITCAST()
3836 return DAG.getTargetExtractSubreg(SystemZ::subreg_h32, in lowerBITCAST()
3841 SDValue In64 = DAG.getTargetInsertSubreg(SystemZ::subreg_h32, DL, in lowerBITCAST()
3845 return DAG.getTargetExtractSubreg(SystemZ::subreg_h32, DL, in lowerBITCAST()
4240 return DAG.getTargetInsertSubreg(SystemZ::subreg_l32, DL, in lowerOR()
4287 CCValid = SystemZ::CCMASK_ARITH; in lowerXALUO()
4288 CCMask = SystemZ::CCMASK_ARITH_OVERFLOW; in lowerXALUO()
4292 CCValid = SystemZ::CCMASK_ARITH; in lowerXALUO()
4293 CCMask = SystemZ::CCMASK_ARITH_OVERFLOW; in lowerXALUO()
4297 CCValid = SystemZ::CCMASK_LOGICAL; in lowerXALUO()
4298 CCMask = SystemZ::CCMASK_LOGICAL_CARRY; in lowerXALUO()
4302 CCValid = SystemZ::CCMASK_LOGICAL; in lowerXALUO()
4303 CCMask = SystemZ::CCMASK_LOGICAL_BORROW; in lowerXALUO()
4387 CCValid = SystemZ::CCMASK_LOGICAL; in lowerUADDSUBO_CARRY()
4388 CCMask = SystemZ::CCMASK_LOGICAL_CARRY; in lowerUADDSUBO_CARRY()
4395 CCValid = SystemZ::CCMASK_LOGICAL; in lowerUADDSUBO_CARRY()
4396 CCMask = SystemZ::CCMASK_LOGICAL_BORROW; in lowerUADDSUBO_CARRY()
4510 return SDValue(DAG.getMachineNode(SystemZ::Serialize, DL, MVT::Other, in lowerATOMIC_FENCE()
4550 Chain = SDValue(DAG.getMachineNode(SystemZ::Serialize, SDLoc(Op), in lowerATOMIC_STORE()
4691 SystemZ::CCMASK_CS, SystemZ::CCMASK_CS_EQ); in lowerATOMIC_CMP_SWAP()
4713 SystemZ::CCMASK_ICMP, SystemZ::CCMASK_CMP_EQ); in lowerATOMIC_CMP_SWAP()
4796 unsigned Code = IsWrite ? SystemZ::PFD_WRITE : SystemZ::PFD_READ; in lowerPREFETCH()
4810 DAG.getConstant(SystemZ::IPM_CC, DL, MVT::i32)); in getCCResult()
4933 unsigned char Bytes[SystemZ::VectorBytes];
5012 for (unsigned I = 0; I < SystemZ::VectorBytes; ++I) { in matchPermute()
5018 if ((Elt ^ P.Bytes[I]) & (SystemZ::VectorBytes - 1)) in matchPermute()
5020 int ModelOpNo = P.Bytes[I] / SystemZ::VectorBytes; in matchPermute()
5021 int RealOpNo = unsigned(Elt) / SystemZ::VectorBytes; in matchPermute()
5050 for (unsigned From = 0; From < SystemZ::VectorBytes; ++From) { in matchDoublePermute()
5058 if (To == SystemZ::VectorBytes) in matchDoublePermute()
5141 int ExpectedShift = (Index - I) % SystemZ::VectorBytes; in isShlDoublePermute()
5142 int ModelOpNo = unsigned(ExpectedShift + I) / SystemZ::VectorBytes; in isShlDoublePermute()
5143 int RealOpNo = unsigned(Index) / SystemZ::VectorBytes; in isShlDoublePermute()
5170 SystemZ::VectorBytes / InBytes); in getPermuteNode()
5179 SystemZ::VectorBytes / P.Operand); in getPermuteNode()
5226 for (unsigned I = 0; I < SystemZ::VectorBytes; ++I) { in getGeneralPermuteNode()
5227 unsigned OpNo = unsigned(Bytes[I]) / SystemZ::VectorBytes; in getGeneralPermuteNode()
5228 unsigned Byte = unsigned(Bytes[I]) % SystemZ::VectorBytes; in getGeneralPermuteNode()
5236 ZeroIdx = I + SystemZ::VectorBytes; in getGeneralPermuteNode()
5242 SDValue IndexNodes[SystemZ::VectorBytes]; in getGeneralPermuteNode()
5243 for (unsigned I = 0; I < SystemZ::VectorBytes; ++I) { in getGeneralPermuteNode()
5245 unsigned OpNo = unsigned(Bytes[I]) / SystemZ::VectorBytes; in getGeneralPermuteNode()
5246 unsigned Byte = unsigned(Bytes[I]) % SystemZ::VectorBytes; in getGeneralPermuteNode()
5250 unsigned BIdx = MaskFirst ? Byte + SystemZ::VectorBytes : Byte; in getGeneralPermuteNode()
5267 SDValue IndexNodes[SystemZ::VectorBytes]; in getGeneralPermuteNode()
5268 for (unsigned I = 0; I < SystemZ::VectorBytes; ++I) in getGeneralPermuteNode()
5290 SmallVector<SDValue, SystemZ::VectorBytes> Ops;
5295 SmallVector<int, SystemZ::VectorBytes> Bytes;
5332 unsigned Byte = ((Elem * FromBytesPerElement) % SystemZ::VectorBytes + in add()
5342 SmallVector<int, SystemZ::VectorBytes> OpBytes; in add()
5352 Op = Op.getOperand(unsigned(NewByte) / SystemZ::VectorBytes); in add()
5353 Byte = unsigned(NewByte) % SystemZ::VectorBytes; in add()
5370 unsigned Base = OpNo * SystemZ::VectorBytes + Byte; in add()
5379 assert(Bytes.size() == SystemZ::VectorBytes && "Incomplete vector"); in getNode()
5406 SmallVector<int, SystemZ::VectorBytes> NewBytes(SystemZ::VectorBytes); in getNode()
5407 for (unsigned J = 0; J < SystemZ::VectorBytes; ++J) { in getNode()
5408 unsigned OpNo = unsigned(Bytes[J]) / SystemZ::VectorBytes; in getNode()
5409 unsigned Byte = unsigned(Bytes[J]) % SystemZ::VectorBytes; in getNode()
5413 NewBytes[J] = SystemZ::VectorBytes + Byte; in getNode()
5418 SmallVector<int, SystemZ::VectorBytes> NewBytesMap(SystemZ::VectorBytes); in getNode()
5422 for (unsigned J = 0; J < SystemZ::VectorBytes; ++J) { in getNode()
5424 assert(unsigned(NewBytesMap[J]) < SystemZ::VectorBytes && in getNode()
5426 Bytes[J] = I * SystemZ::VectorBytes + NewBytesMap[J]; in getNode()
5433 for (unsigned J = 0; J < SystemZ::VectorBytes; ++J) in getNode()
5435 Bytes[J] = I * SystemZ::VectorBytes + J; in getNode()
5443 for (unsigned I = 0; I < SystemZ::VectorBytes; ++I) in getNode()
5444 if (Bytes[I] >= int(SystemZ::VectorBytes)) in getNode()
5445 Bytes[I] -= (Stride - 1) * SystemZ::VectorBytes; in getNode()
5491 SmallVector<int, SystemZ::VectorBytes> SrcBytes; in tryPrepareForUnpack()
5492 for (unsigned Elt = 0; Elt < SystemZ::VectorBytes; Elt++) { in tryPrepareForUnpack()
5498 unsigned OpNo = unsigned(Bytes[Elt]) / SystemZ::VectorBytes; in tryPrepareForUnpack()
5508 for (unsigned i = 0; i < SystemZ::VectorBytes / 2; i++) in tryPrepareForUnpack()
5527 for (unsigned Elt = 0; Elt < SystemZ::VectorBytes;) { in tryPrepareForUnpack()
5532 while (B < SystemZ::VectorBytes) in tryPrepareForUnpack()
5537 for (unsigned I = 0; I < SystemZ::VectorBytes; ++I) in tryPrepareForUnpack()
5539 unsigned OpNo = unsigned(Bytes[I]) / SystemZ::VectorBytes; in tryPrepareForUnpack()
5541 Bytes[I] -= SystemZ::VectorBytes; in tryPrepareForUnpack()
5555 SystemZ::VectorBits / InBits); in insertUnpackIfPrepared()
5559 SystemZ::VectorBits / OutBits); in insertUnpackIfPrepared()
5636 SmallVector<SDValue, SystemZ::VectorBytes> ResidueOps; in tryBuildVectorShuffle()
5760 SmallVector<SDValue, SystemZ::VectorBytes> Constants(NumElements, SDValue()); in buildVector()
5761 SmallVector<bool, SystemZ::VectorBytes> Done(NumElements, false); in buildVector()
5852 SmallVector<SDValue, SystemZ::VectorBytes> Ops(NumElements); in lowerBUILD_VECTOR()
5967 SystemZ::VectorBits / FromBits); in lowerSIGN_EXTEND_VECTOR_INREG()
6067 TDCMask |= SystemZ::TDCMASK_SNAN_PLUS | SystemZ::TDCMASK_SNAN_MINUS; in lowerIS_FPCLASS()
6069 TDCMask |= SystemZ::TDCMASK_QNAN_PLUS | SystemZ::TDCMASK_QNAN_MINUS; in lowerIS_FPCLASS()
6071 TDCMask |= SystemZ::TDCMASK_INFINITY_PLUS; in lowerIS_FPCLASS()
6073 TDCMask |= SystemZ::TDCMASK_INFINITY_MINUS; in lowerIS_FPCLASS()
6075 TDCMask |= SystemZ::TDCMASK_NORMAL_PLUS; in lowerIS_FPCLASS()
6077 TDCMask |= SystemZ::TDCMASK_NORMAL_MINUS; in lowerIS_FPCLASS()
6079 TDCMask |= SystemZ::TDCMASK_SUBNORMAL_PLUS; in lowerIS_FPCLASS()
6081 TDCMask |= SystemZ::TDCMASK_SUBNORMAL_MINUS; in lowerIS_FPCLASS()
6083 TDCMask |= SystemZ::TDCMASK_ZERO_PLUS; in lowerIS_FPCLASS()
6085 TDCMask |= SystemZ::TDCMASK_ZERO_MINUS; in lowerIS_FPCLASS()
6250 Res = SDValue(DAG.getMachineNode(SystemZ::Serialize, DL, in LowerOperationWrapper()
6265 SystemZ::CCMASK_CS, SystemZ::CCMASK_CS_EQ); in LowerOperationWrapper()
6278 if (getRepRegClassFor(MVT::f128) == &SystemZ::VR128BitRegClass) { in LowerOperationWrapper()
6285 assert(getRepRegClassFor(MVT::f128) == &SystemZ::FP128BitRegClass && in LowerOperationWrapper()
6287 SDValue LoFP = DAG.getTargetExtractSubreg(SystemZ::subreg_l64, in LowerOperationWrapper()
6289 SDValue HiFP = DAG.getTargetExtractSubreg(SystemZ::subreg_h64, in LowerOperationWrapper()
6482 SmallVector<int, SystemZ::VectorBytes> Bytes; in combineExtract()
6723 SystemZ::VectorBytes / ElemBytes / 2); in combineMERGE()
7445 if (CCValid != SystemZ::CCMASK_ICMP) in combineCCMask()
7459 if (CCMask == SystemZ::CCMASK_CMP_NE) in combineCCMask()
7461 else if (CCMask != SystemZ::CCMASK_CMP_EQ) in combineCCMask()
7500 if (!SHLCount || SHLCount->getZExtValue() != 30 - SystemZ::IPM_CC) in combineCCMask()
7514 CCMask = SystemZ::reverseCCMask(CCMask); in combineCCMask()
8027 Register Reg = MRI.createVirtualRegister(&SystemZ::ADDR64BitRegClass); in forceReg()
8028 BuildMI(*MBB, MI, MI.getDebugLoc(), TII->get(SystemZ::COPY), Reg) in forceReg()
8033 Register Reg = MRI.createVirtualRegister(&SystemZ::ADDR64BitRegClass); in forceReg()
8034 BuildMI(*MBB, MI, MI.getDebugLoc(), TII->get(SystemZ::LA), Reg) in forceReg()
8049 if (mi.readsRegister(SystemZ::CC)) in checkCCKill()
8051 if (mi.definesRegister(SystemZ::CC)) in checkCCKill()
8059 if (Succ->isLiveIn(SystemZ::CC)) in checkCCKill()
8071 case SystemZ::Select32: in isSelectPseudo()
8072 case SystemZ::Select64: in isSelectPseudo()
8073 case SystemZ::Select128: in isSelectPseudo()
8074 case SystemZ::SelectF32: in isSelectPseudo()
8075 case SystemZ::SelectF64: in isSelectPseudo()
8076 case SystemZ::SelectF128: in isSelectPseudo()
8077 case SystemZ::SelectVR32: in isSelectPseudo()
8078 case SystemZ::SelectVR64: in isSelectPseudo()
8079 case SystemZ::SelectVR128: in isSelectPseudo()
8129 BuildMI(*SinkMBB, SinkInsertionPoint, DL, TII->get(SystemZ::PHI), DestReg) in createPHIsForSelects()
8169 if (NextMI.definesRegister(SystemZ::CC) || NextMI.usesCustomInsertionHook()) in emitSelect()
8188 (LastMI->killsRegister(SystemZ::CC) || checkCCKill(*LastMI, MBB)); in emitSelect()
8190 MachineBasicBlock *JoinMBB = SystemZ::splitBlockAfter(LastMI, MBB); in emitSelect()
8191 MachineBasicBlock *FalseMBB = SystemZ::emitBlockAfter(StartMBB); in emitSelect()
8196 FalseMBB->addLiveIn(SystemZ::CC); in emitSelect()
8197 JoinMBB->addLiveIn(SystemZ::CC); in emitSelect()
8204 BuildMI(MBB, MI.getDebugLoc(), TII->get(SystemZ::BRC)) in emitSelect()
8283 MachineBasicBlock *JoinMBB = SystemZ::splitBlockBefore(MI, MBB); in emitCondStore()
8284 MachineBasicBlock *FalseMBB = SystemZ::emitBlockAfter(StartMBB); in emitCondStore()
8288 if (!MI.killsRegister(SystemZ::CC) && !checkCCKill(MI, JoinMBB)) { in emitCondStore()
8289 FalseMBB->addLiveIn(SystemZ::CC); in emitCondStore()
8290 JoinMBB->addLiveIn(SystemZ::CC); in emitCondStore()
8297 BuildMI(MBB, DL, TII->get(SystemZ::BRC)) in emitCondStore()
8333 MachineBasicBlock *JoinMBB = SystemZ::splitBlockAfter(MI, MBB); in emitICmp128Hi()
8334 MachineBasicBlock *HiEqMBB = SystemZ::emitBlockAfter(StartMBB); in emitICmp128Hi()
8350 int HiOpcode = Unsigned? SystemZ::VECLG : SystemZ::VECG; in emitICmp128Hi()
8353 BuildMI(MBB, MI.getDebugLoc(), TII->get(SystemZ::BRC)) in emitICmp128Hi()
8354 .addImm(SystemZ::CCMASK_ICMP).addImm(SystemZ::CCMASK_CMP_NE).addMBB(JoinMBB); in emitICmp128Hi()
8369 Register Temp = MRI.createVirtualRegister(&SystemZ::VR128BitRegClass); in emitICmp128Hi()
8370 BuildMI(MBB, MI.getDebugLoc(), TII->get(SystemZ::VCHLGS), Temp) in emitICmp128Hi()
8375 JoinMBB->addLiveIn(SystemZ::CC); in emitICmp128Hi()
8405 unsigned LOpcode = TII->getOpcodeForOffset(SystemZ::L, Disp); in emitAtomicLoadBinary()
8406 unsigned CSOpcode = TII->getOpcodeForOffset(SystemZ::CS, Disp); in emitAtomicLoadBinary()
8410 Register OrigVal = MRI.createVirtualRegister(&SystemZ::GR32BitRegClass); in emitAtomicLoadBinary()
8411 Register OldVal = MRI.createVirtualRegister(&SystemZ::GR32BitRegClass); in emitAtomicLoadBinary()
8412 Register NewVal = MRI.createVirtualRegister(&SystemZ::GR32BitRegClass); in emitAtomicLoadBinary()
8413 Register RotatedOldVal = MRI.createVirtualRegister(&SystemZ::GR32BitRegClass); in emitAtomicLoadBinary()
8414 Register RotatedNewVal = MRI.createVirtualRegister(&SystemZ::GR32BitRegClass); in emitAtomicLoadBinary()
8418 MachineBasicBlock *DoneMBB = SystemZ::splitBlockBefore(MI, MBB); in emitAtomicLoadBinary()
8419 MachineBasicBlock *LoopMBB = SystemZ::emitBlockAfter(StartMBB); in emitAtomicLoadBinary()
8438 BuildMI(MBB, DL, TII->get(SystemZ::PHI), OldVal) in emitAtomicLoadBinary()
8441 BuildMI(MBB, DL, TII->get(SystemZ::RLL), RotatedOldVal) in emitAtomicLoadBinary()
8445 Register Tmp = MRI.createVirtualRegister(&SystemZ::GR32BitRegClass); in emitAtomicLoadBinary()
8448 BuildMI(MBB, DL, TII->get(SystemZ::XILF), RotatedNewVal) in emitAtomicLoadBinary()
8458 BuildMI(MBB, DL, TII->get(SystemZ::RISBG32), RotatedNewVal) in emitAtomicLoadBinary()
8461 BuildMI(MBB, DL, TII->get(SystemZ::RLL), NewVal) in emitAtomicLoadBinary()
8468 BuildMI(MBB, DL, TII->get(SystemZ::BRC)) in emitAtomicLoadBinary()
8469 .addImm(SystemZ::CCMASK_CS).addImm(SystemZ::CCMASK_CS_NE).addMBB(LoopMBB); in emitAtomicLoadBinary()
8500 unsigned LOpcode = TII->getOpcodeForOffset(SystemZ::L, Disp); in emitAtomicLoadMinMax()
8501 unsigned CSOpcode = TII->getOpcodeForOffset(SystemZ::CS, Disp); in emitAtomicLoadMinMax()
8505 Register OrigVal = MRI.createVirtualRegister(&SystemZ::GR32BitRegClass); in emitAtomicLoadMinMax()
8506 Register OldVal = MRI.createVirtualRegister(&SystemZ::GR32BitRegClass); in emitAtomicLoadMinMax()
8507 Register NewVal = MRI.createVirtualRegister(&SystemZ::GR32BitRegClass); in emitAtomicLoadMinMax()
8508 Register RotatedOldVal = MRI.createVirtualRegister(&SystemZ::GR32BitRegClass); in emitAtomicLoadMinMax()
8509 Register RotatedAltVal = MRI.createVirtualRegister(&SystemZ::GR32BitRegClass); in emitAtomicLoadMinMax()
8510 Register RotatedNewVal = MRI.createVirtualRegister(&SystemZ::GR32BitRegClass); in emitAtomicLoadMinMax()
8514 MachineBasicBlock *DoneMBB = SystemZ::splitBlockBefore(MI, MBB); in emitAtomicLoadMinMax()
8515 MachineBasicBlock *LoopMBB = SystemZ::emitBlockAfter(StartMBB); in emitAtomicLoadMinMax()
8516 MachineBasicBlock *UseAltMBB = SystemZ::emitBlockAfter(LoopMBB); in emitAtomicLoadMinMax()
8517 MachineBasicBlock *UpdateMBB = SystemZ::emitBlockAfter(UseAltMBB); in emitAtomicLoadMinMax()
8533 BuildMI(MBB, DL, TII->get(SystemZ::PHI), OldVal) in emitAtomicLoadMinMax()
8536 BuildMI(MBB, DL, TII->get(SystemZ::RLL), RotatedOldVal) in emitAtomicLoadMinMax()
8540 BuildMI(MBB, DL, TII->get(SystemZ::BRC)) in emitAtomicLoadMinMax()
8541 .addImm(SystemZ::CCMASK_ICMP).addImm(KeepOldMask).addMBB(UpdateMBB); in emitAtomicLoadMinMax()
8549 BuildMI(MBB, DL, TII->get(SystemZ::RISBG32), RotatedAltVal) in emitAtomicLoadMinMax()
8562 BuildMI(MBB, DL, TII->get(SystemZ::PHI), RotatedNewVal) in emitAtomicLoadMinMax()
8565 BuildMI(MBB, DL, TII->get(SystemZ::RLL), NewVal) in emitAtomicLoadMinMax()
8572 BuildMI(MBB, DL, TII->get(SystemZ::BRC)) in emitAtomicLoadMinMax()
8573 .addImm(SystemZ::CCMASK_CS).addImm(SystemZ::CCMASK_CS_NE).addMBB(LoopMBB); in emitAtomicLoadMinMax()
8601 const TargetRegisterClass *RC = &SystemZ::GR32BitRegClass; in emitAtomicCmpSwapW()
8604 unsigned LOpcode = TII->getOpcodeForOffset(SystemZ::L, Disp); in emitAtomicCmpSwapW()
8605 unsigned CSOpcode = TII->getOpcodeForOffset(SystemZ::CS, Disp); in emitAtomicCmpSwapW()
8606 unsigned ZExtOpcode = BitSize == 8 ? SystemZ::LLCR : SystemZ::LLHR; in emitAtomicCmpSwapW()
8620 MachineBasicBlock *DoneMBB = SystemZ::splitBlockBefore(MI, MBB); in emitAtomicCmpSwapW()
8621 MachineBasicBlock *LoopMBB = SystemZ::emitBlockAfter(StartMBB); in emitAtomicCmpSwapW()
8622 MachineBasicBlock *SetMBB = SystemZ::emitBlockAfter(LoopMBB); in emitAtomicCmpSwapW()
8649 BuildMI(MBB, DL, TII->get(SystemZ::PHI), OldVal) in emitAtomicCmpSwapW()
8652 BuildMI(MBB, DL, TII->get(SystemZ::PHI), SwapVal) in emitAtomicCmpSwapW()
8655 BuildMI(MBB, DL, TII->get(SystemZ::RLL), OldValRot) in emitAtomicCmpSwapW()
8657 BuildMI(MBB, DL, TII->get(SystemZ::RISBG32), RetrySwapVal) in emitAtomicCmpSwapW()
8661 BuildMI(MBB, DL, TII->get(SystemZ::CR)) in emitAtomicCmpSwapW()
8663 BuildMI(MBB, DL, TII->get(SystemZ::BRC)) in emitAtomicCmpSwapW()
8664 .addImm(SystemZ::CCMASK_ICMP) in emitAtomicCmpSwapW()
8665 .addImm(SystemZ::CCMASK_CMP_NE).addMBB(DoneMBB); in emitAtomicCmpSwapW()
8676 BuildMI(MBB, DL, TII->get(SystemZ::RLL), StoreVal) in emitAtomicCmpSwapW()
8683 BuildMI(MBB, DL, TII->get(SystemZ::BRC)) in emitAtomicCmpSwapW()
8684 .addImm(SystemZ::CCMASK_CS).addImm(SystemZ::CCMASK_CS_NE).addMBB(LoopMBB); in emitAtomicCmpSwapW()
8691 if (!MI.registerDefIsDead(SystemZ::CC)) in emitAtomicCmpSwapW()
8692 DoneMBB->addLiveIn(SystemZ::CC); in emitAtomicCmpSwapW()
8710 Register Tmp1 = MRI.createVirtualRegister(&SystemZ::GR128BitRegClass); in emitPair128()
8711 Register Tmp2 = MRI.createVirtualRegister(&SystemZ::GR128BitRegClass); in emitPair128()
8715 .addReg(Tmp1).addReg(Hi).addImm(SystemZ::subreg_h64); in emitPair128()
8717 .addReg(Tmp2).addReg(Lo).addImm(SystemZ::subreg_l64); in emitPair128()
8736 Register In128 = MRI.createVirtualRegister(&SystemZ::GR128BitRegClass); in emitExt128()
8740 Register NewIn128 = MRI.createVirtualRegister(&SystemZ::GR128BitRegClass); in emitExt128()
8741 Register Zero64 = MRI.createVirtualRegister(&SystemZ::GR64BitRegClass); in emitExt128()
8743 BuildMI(*MBB, MI, DL, TII->get(SystemZ::LLILL), Zero64) in emitExt128()
8746 .addReg(In128).addReg(Zero64).addImm(SystemZ::subreg_h64); in emitExt128()
8750 .addReg(In128).addReg(Src).addImm(SystemZ::subreg_l64); in emitExt128()
8773 Register Reg = MRI.createVirtualRegister(&SystemZ::ADDR64BitRegClass); in emitMemMemWrapper()
8774 unsigned Opcode = TII->getOpcodeForOffset(SystemZ::LA, Disp); in emitMemMemWrapper()
8805 BuildMI(*InsMBB, InsPos, DL, TII->get(SystemZ::MVI)) in emitMemMemWrapper()
8808 BuildMI(*InsMBB, InsPos, DL, TII->get(SystemZ::STC)) in emitMemMemWrapper()
8821 Register LenAdjReg = SystemZ::NoRegister; in emitMemMemWrapper()
8829 if (Opcode == SystemZ::CLC) { in emitMemMemWrapper()
8854 (Opcode == SystemZ::CLC && (ImmLength > 256 || NeedsLoop) in emitMemMemWrapper()
8855 ? SystemZ::splitBlockAfter(MI, MBB) in emitMemMemWrapper()
8860 MRI.createVirtualRegister(&SystemZ::GR64BitRegClass); in emitMemMemWrapper()
8865 BuildMI(*MBB, MI, DL, TII->get(SystemZ::SRLG), StartCountReg) in emitMemMemWrapper()
8873 Register Reg = MRI.createVirtualRegister(&SystemZ::ADDR64BitRegClass); in emitMemMemWrapper()
8874 BuildMI(*MBB, MI, DL, TII->get(SystemZ::LGHI), Reg).addImm(0); in emitMemMemWrapper()
8877 if (DestBase.isReg() && DestBase.getReg() == SystemZ::NoRegister) in emitMemMemWrapper()
8879 if (SrcBase.isReg() && SrcBase.getReg() == SystemZ::NoRegister) in emitMemMemWrapper()
8892 const TargetRegisterClass *RC = &SystemZ::ADDR64BitRegClass; in emitMemMemWrapper()
8899 RC = &SystemZ::GR64BitRegClass; in emitMemMemWrapper()
8904 AllDoneMBB = SystemZ::splitBlockBefore(MI, MBB); in emitMemMemWrapper()
8905 StartMBB = SystemZ::emitBlockAfter(MBB); in emitMemMemWrapper()
8906 LoopMBB = SystemZ::emitBlockAfter(StartMBB); in emitMemMemWrapper()
8907 NextMBB = (EndMBB ? SystemZ::emitBlockAfter(LoopMBB) : LoopMBB); in emitMemMemWrapper()
8908 DoneMBB = SystemZ::emitBlockAfter(NextMBB); in emitMemMemWrapper()
8912 BuildMI(MBB, DL, TII->get(SystemZ::CGHI)) in emitMemMemWrapper()
8914 BuildMI(MBB, DL, TII->get(SystemZ::BRC)) in emitMemMemWrapper()
8915 .addImm(SystemZ::CCMASK_ICMP).addImm(SystemZ::CCMASK_CMP_EQ) in emitMemMemWrapper()
8924 MachineBasicBlock *MemsetOneCheckMBB = SystemZ::emitBlockAfter(MBB); in emitMemMemWrapper()
8925 MachineBasicBlock *MemsetOneMBB = SystemZ::emitBlockAfter(&*MF.rbegin()); in emitMemMemWrapper()
8928 BuildMI(MBB, DL, TII->get(SystemZ::CGHI)) in emitMemMemWrapper()
8930 BuildMI(MBB, DL, TII->get(SystemZ::BRC)) in emitMemMemWrapper()
8931 .addImm(SystemZ::CCMASK_ICMP).addImm(SystemZ::CCMASK_CMP_EQ) in emitMemMemWrapper()
8943 BuildMI(MBB, DL, TII->get(SystemZ::J)).addMBB(AllDoneMBB); in emitMemMemWrapper()
8950 BuildMI(MBB, DL, TII->get(SystemZ::CGHI)) in emitMemMemWrapper()
8952 BuildMI(MBB, DL, TII->get(SystemZ::BRC)) in emitMemMemWrapper()
8953 .addImm(SystemZ::CCMASK_ICMP).addImm(SystemZ::CCMASK_CMP_EQ) in emitMemMemWrapper()
8960 DoneMBB = SystemZ::splitBlockBefore(MI, MBB); in emitMemMemWrapper()
8961 LoopMBB = SystemZ::emitBlockAfter(StartMBB); in emitMemMemWrapper()
8962 NextMBB = (EndMBB ? SystemZ::emitBlockAfter(LoopMBB) : LoopMBB); in emitMemMemWrapper()
8973 DoneMBB->addLiveIn(SystemZ::CC); in emitMemMemWrapper()
8989 BuildMI(MBB, DL, TII->get(SystemZ::PHI), ThisDestReg) in emitMemMemWrapper()
8993 BuildMI(MBB, DL, TII->get(SystemZ::PHI), ThisSrcReg) in emitMemMemWrapper()
8996 BuildMI(MBB, DL, TII->get(SystemZ::PHI), ThisCountReg) in emitMemMemWrapper()
8999 if (Opcode == SystemZ::MVC) in emitMemMemWrapper()
9000 BuildMI(MBB, DL, TII->get(SystemZ::PFD)) in emitMemMemWrapper()
9001 .addImm(SystemZ::PFD_WRITE) in emitMemMemWrapper()
9007 BuildMI(MBB, DL, TII->get(SystemZ::BRC)) in emitMemMemWrapper()
9008 .addImm(SystemZ::CCMASK_ICMP).addImm(SystemZ::CCMASK_CMP_NE) in emitMemMemWrapper()
9024 BuildMI(MBB, DL, TII->get(SystemZ::LA), NextDestReg) in emitMemMemWrapper()
9027 BuildMI(MBB, DL, TII->get(SystemZ::LA), NextSrcReg) in emitMemMemWrapper()
9029 BuildMI(MBB, DL, TII->get(SystemZ::AGHI), NextCountReg) in emitMemMemWrapper()
9031 BuildMI(MBB, DL, TII->get(SystemZ::CGHI)) in emitMemMemWrapper()
9033 BuildMI(MBB, DL, TII->get(SystemZ::BRC)) in emitMemMemWrapper()
9034 .addImm(SystemZ::CCMASK_ICMP).addImm(SystemZ::CCMASK_CMP_NE) in emitMemMemWrapper()
9048 Register RemSrcReg = MRI.createVirtualRegister(&SystemZ::ADDR64BitRegClass); in emitMemMemWrapper()
9050 : MRI.createVirtualRegister(&SystemZ::ADDR64BitRegClass); in emitMemMemWrapper()
9051 BuildMI(MBB, DL, TII->get(SystemZ::PHI), RemDestReg) in emitMemMemWrapper()
9055 BuildMI(MBB, DL, TII->get(SystemZ::PHI), RemSrcReg) in emitMemMemWrapper()
9063 BuildMI(MBB, DL, TII->get(SystemZ::EXRL_Pseudo)) in emitMemMemWrapper()
9070 if (Opcode != SystemZ::MVC) { in emitMemMemWrapper()
9071 EXRL_MIB.addReg(SystemZ::CC, RegState::ImplicitDefine); in emitMemMemWrapper()
9073 MBB->addLiveIn(SystemZ::CC); in emitMemMemWrapper()
9093 MachineBasicBlock *NextMBB = SystemZ::splitBlockBefore(MI, MBB); in emitMemMemWrapper()
9094 BuildMI(MBB, DL, TII->get(SystemZ::BRC)) in emitMemMemWrapper()
9095 .addImm(SystemZ::CCMASK_ICMP).addImm(SystemZ::CCMASK_CMP_NE) in emitMemMemWrapper()
9105 MBB->addLiveIn(SystemZ::CC); in emitMemMemWrapper()
9126 const TargetRegisterClass *RC = &SystemZ::GR64BitRegClass; in emitStringWrapper()
9132 MachineBasicBlock *DoneMBB = SystemZ::splitBlockBefore(MI, MBB); in emitStringWrapper()
9133 MachineBasicBlock *LoopMBB = SystemZ::emitBlockAfter(StartMBB); in emitStringWrapper()
9150 BuildMI(MBB, DL, TII->get(SystemZ::PHI), This1Reg) in emitStringWrapper()
9153 BuildMI(MBB, DL, TII->get(SystemZ::PHI), This2Reg) in emitStringWrapper()
9156 BuildMI(MBB, DL, TII->get(TargetOpcode::COPY), SystemZ::R0L).addReg(CharReg); in emitStringWrapper()
9160 BuildMI(MBB, DL, TII->get(SystemZ::BRC)) in emitStringWrapper()
9161 .addImm(SystemZ::CCMASK_ANY).addImm(SystemZ::CCMASK_3).addMBB(LoopMBB); in emitStringWrapper()
9165 DoneMBB->addLiveIn(SystemZ::CC); in emitStringWrapper()
9252 MachineBasicBlock *DoneMBB = SystemZ::splitBlockAfter(MI, MBB); in emitProbedAlloca()
9253 MachineBasicBlock *LoopTestMBB = SystemZ::emitBlockAfter(StartMBB); in emitProbedAlloca()
9254 MachineBasicBlock *LoopBodyMBB = SystemZ::emitBlockAfter(LoopTestMBB); in emitProbedAlloca()
9255 MachineBasicBlock *TailTestMBB = SystemZ::emitBlockAfter(LoopBodyMBB); in emitProbedAlloca()
9256 MachineBasicBlock *TailMBB = SystemZ::emitBlockAfter(TailTestMBB); in emitProbedAlloca()
9261 Register PHIReg = MRI->createVirtualRegister(&SystemZ::ADDR64BitRegClass); in emitProbedAlloca()
9262 Register IncReg = MRI->createVirtualRegister(&SystemZ::ADDR64BitRegClass); in emitProbedAlloca()
9269 BuildMI(MBB, DL, TII->get(SystemZ::PHI), PHIReg) in emitProbedAlloca()
9274 BuildMI(MBB, DL, TII->get(SystemZ::CLGFI)) in emitProbedAlloca()
9277 BuildMI(MBB, DL, TII->get(SystemZ::BRC)) in emitProbedAlloca()
9278 .addImm(SystemZ::CCMASK_ICMP).addImm(SystemZ::CCMASK_CMP_LT) in emitProbedAlloca()
9286 BuildMI(MBB, DL, TII->get(SystemZ::SLGFI), IncReg) in emitProbedAlloca()
9289 BuildMI(MBB, DL, TII->get(SystemZ::SLGFI), SystemZ::R15D) in emitProbedAlloca()
9290 .addReg(SystemZ::R15D) in emitProbedAlloca()
9292 BuildMI(MBB, DL, TII->get(SystemZ::CG)).addReg(SystemZ::R15D) in emitProbedAlloca()
9293 .addReg(SystemZ::R15D).addImm(ProbeSize - 8).addReg(0) in emitProbedAlloca()
9295 BuildMI(MBB, DL, TII->get(SystemZ::J)).addMBB(LoopTestMBB); in emitProbedAlloca()
9302 BuildMI(MBB, DL, TII->get(SystemZ::CGHI)) in emitProbedAlloca()
9305 BuildMI(MBB, DL, TII->get(SystemZ::BRC)) in emitProbedAlloca()
9306 .addImm(SystemZ::CCMASK_ICMP).addImm(SystemZ::CCMASK_CMP_EQ) in emitProbedAlloca()
9314 BuildMI(MBB, DL, TII->get(SystemZ::SLGR), SystemZ::R15D) in emitProbedAlloca()
9315 .addReg(SystemZ::R15D) in emitProbedAlloca()
9317 BuildMI(MBB, DL, TII->get(SystemZ::CG)).addReg(SystemZ::R15D) in emitProbedAlloca()
9318 .addReg(SystemZ::R15D).addImm(-8).addReg(PHIReg) in emitProbedAlloca()
9325 .addReg(SystemZ::R15D); in emitProbedAlloca()
9343 case SystemZ::Select32: in EmitInstrWithCustomInserter()
9344 case SystemZ::Select64: in EmitInstrWithCustomInserter()
9345 case SystemZ::Select128: in EmitInstrWithCustomInserter()
9346 case SystemZ::SelectF32: in EmitInstrWithCustomInserter()
9347 case SystemZ::SelectF64: in EmitInstrWithCustomInserter()
9348 case SystemZ::SelectF128: in EmitInstrWithCustomInserter()
9349 case SystemZ::SelectVR32: in EmitInstrWithCustomInserter()
9350 case SystemZ::SelectVR64: in EmitInstrWithCustomInserter()
9351 case SystemZ::SelectVR128: in EmitInstrWithCustomInserter()
9354 case SystemZ::CondStore8Mux: in EmitInstrWithCustomInserter()
9355 return emitCondStore(MI, MBB, SystemZ::STCMux, 0, false); in EmitInstrWithCustomInserter()
9356 case SystemZ::CondStore8MuxInv: in EmitInstrWithCustomInserter()
9357 return emitCondStore(MI, MBB, SystemZ::STCMux, 0, true); in EmitInstrWithCustomInserter()
9358 case SystemZ::CondStore16Mux: in EmitInstrWithCustomInserter()
9359 return emitCondStore(MI, MBB, SystemZ::STHMux, 0, false); in EmitInstrWithCustomInserter()
9360 case SystemZ::CondStore16MuxInv: in EmitInstrWithCustomInserter()
9361 return emitCondStore(MI, MBB, SystemZ::STHMux, 0, true); in EmitInstrWithCustomInserter()
9362 case SystemZ::CondStore32Mux: in EmitInstrWithCustomInserter()
9363 return emitCondStore(MI, MBB, SystemZ::STMux, SystemZ::STOCMux, false); in EmitInstrWithCustomInserter()
9364 case SystemZ::CondStore32MuxInv: in EmitInstrWithCustomInserter()
9365 return emitCondStore(MI, MBB, SystemZ::STMux, SystemZ::STOCMux, true); in EmitInstrWithCustomInserter()
9366 case SystemZ::CondStore8: in EmitInstrWithCustomInserter()
9367 return emitCondStore(MI, MBB, SystemZ::STC, 0, false); in EmitInstrWithCustomInserter()
9368 case SystemZ::CondStore8Inv: in EmitInstrWithCustomInserter()
9369 return emitCondStore(MI, MBB, SystemZ::STC, 0, true); in EmitInstrWithCustomInserter()
9370 case SystemZ::CondStore16: in EmitInstrWithCustomInserter()
9371 return emitCondStore(MI, MBB, SystemZ::STH, 0, false); in EmitInstrWithCustomInserter()
9372 case SystemZ::CondStore16Inv: in EmitInstrWithCustomInserter()
9373 return emitCondStore(MI, MBB, SystemZ::STH, 0, true); in EmitInstrWithCustomInserter()
9374 case SystemZ::CondStore32: in EmitInstrWithCustomInserter()
9375 return emitCondStore(MI, MBB, SystemZ::ST, SystemZ::STOC, false); in EmitInstrWithCustomInserter()
9376 case SystemZ::CondStore32Inv: in EmitInstrWithCustomInserter()
9377 return emitCondStore(MI, MBB, SystemZ::ST, SystemZ::STOC, true); in EmitInstrWithCustomInserter()
9378 case SystemZ::CondStore64: in EmitInstrWithCustomInserter()
9379 return emitCondStore(MI, MBB, SystemZ::STG, SystemZ::STOCG, false); in EmitInstrWithCustomInserter()
9380 case SystemZ::CondStore64Inv: in EmitInstrWithCustomInserter()
9381 return emitCondStore(MI, MBB, SystemZ::STG, SystemZ::STOCG, true); in EmitInstrWithCustomInserter()
9382 case SystemZ::CondStoreF32: in EmitInstrWithCustomInserter()
9383 return emitCondStore(MI, MBB, SystemZ::STE, 0, false); in EmitInstrWithCustomInserter()
9384 case SystemZ::CondStoreF32Inv: in EmitInstrWithCustomInserter()
9385 return emitCondStore(MI, MBB, SystemZ::STE, 0, true); in EmitInstrWithCustomInserter()
9386 case SystemZ::CondStoreF64: in EmitInstrWithCustomInserter()
9387 return emitCondStore(MI, MBB, SystemZ::STD, 0, false); in EmitInstrWithCustomInserter()
9388 case SystemZ::CondStoreF64Inv: in EmitInstrWithCustomInserter()
9389 return emitCondStore(MI, MBB, SystemZ::STD, 0, true); in EmitInstrWithCustomInserter()
9391 case SystemZ::SCmp128Hi: in EmitInstrWithCustomInserter()
9393 case SystemZ::UCmp128Hi: in EmitInstrWithCustomInserter()
9396 case SystemZ::PAIR128: in EmitInstrWithCustomInserter()
9398 case SystemZ::AEXT128: in EmitInstrWithCustomInserter()
9400 case SystemZ::ZEXT128: in EmitInstrWithCustomInserter()
9403 case SystemZ::ATOMIC_SWAPW: in EmitInstrWithCustomInserter()
9406 case SystemZ::ATOMIC_LOADW_AR: in EmitInstrWithCustomInserter()
9407 return emitAtomicLoadBinary(MI, MBB, SystemZ::AR); in EmitInstrWithCustomInserter()
9408 case SystemZ::ATOMIC_LOADW_AFI: in EmitInstrWithCustomInserter()
9409 return emitAtomicLoadBinary(MI, MBB, SystemZ::AFI); in EmitInstrWithCustomInserter()
9411 case SystemZ::ATOMIC_LOADW_SR: in EmitInstrWithCustomInserter()
9412 return emitAtomicLoadBinary(MI, MBB, SystemZ::SR); in EmitInstrWithCustomInserter()
9414 case SystemZ::ATOMIC_LOADW_NR: in EmitInstrWithCustomInserter()
9415 return emitAtomicLoadBinary(MI, MBB, SystemZ::NR); in EmitInstrWithCustomInserter()
9416 case SystemZ::ATOMIC_LOADW_NILH: in EmitInstrWithCustomInserter()
9417 return emitAtomicLoadBinary(MI, MBB, SystemZ::NILH); in EmitInstrWithCustomInserter()
9419 case SystemZ::ATOMIC_LOADW_OR: in EmitInstrWithCustomInserter()
9420 return emitAtomicLoadBinary(MI, MBB, SystemZ::OR); in EmitInstrWithCustomInserter()
9421 case SystemZ::ATOMIC_LOADW_OILH: in EmitInstrWithCustomInserter()
9422 return emitAtomicLoadBinary(MI, MBB, SystemZ::OILH); in EmitInstrWithCustomInserter()
9424 case SystemZ::ATOMIC_LOADW_XR: in EmitInstrWithCustomInserter()
9425 return emitAtomicLoadBinary(MI, MBB, SystemZ::XR); in EmitInstrWithCustomInserter()
9426 case SystemZ::ATOMIC_LOADW_XILF: in EmitInstrWithCustomInserter()
9427 return emitAtomicLoadBinary(MI, MBB, SystemZ::XILF); in EmitInstrWithCustomInserter()
9429 case SystemZ::ATOMIC_LOADW_NRi: in EmitInstrWithCustomInserter()
9430 return emitAtomicLoadBinary(MI, MBB, SystemZ::NR, true); in EmitInstrWithCustomInserter()
9431 case SystemZ::ATOMIC_LOADW_NILHi: in EmitInstrWithCustomInserter()
9432 return emitAtomicLoadBinary(MI, MBB, SystemZ::NILH, true); in EmitInstrWithCustomInserter()
9434 case SystemZ::ATOMIC_LOADW_MIN: in EmitInstrWithCustomInserter()
9435 return emitAtomicLoadMinMax(MI, MBB, SystemZ::CR, SystemZ::CCMASK_CMP_LE); in EmitInstrWithCustomInserter()
9436 case SystemZ::ATOMIC_LOADW_MAX: in EmitInstrWithCustomInserter()
9437 return emitAtomicLoadMinMax(MI, MBB, SystemZ::CR, SystemZ::CCMASK_CMP_GE); in EmitInstrWithCustomInserter()
9438 case SystemZ::ATOMIC_LOADW_UMIN: in EmitInstrWithCustomInserter()
9439 return emitAtomicLoadMinMax(MI, MBB, SystemZ::CLR, SystemZ::CCMASK_CMP_LE); in EmitInstrWithCustomInserter()
9440 case SystemZ::ATOMIC_LOADW_UMAX: in EmitInstrWithCustomInserter()
9441 return emitAtomicLoadMinMax(MI, MBB, SystemZ::CLR, SystemZ::CCMASK_CMP_GE); in EmitInstrWithCustomInserter()
9443 case SystemZ::ATOMIC_CMP_SWAPW: in EmitInstrWithCustomInserter()
9445 case SystemZ::MVCImm: in EmitInstrWithCustomInserter()
9446 case SystemZ::MVCReg: in EmitInstrWithCustomInserter()
9447 return emitMemMemWrapper(MI, MBB, SystemZ::MVC); in EmitInstrWithCustomInserter()
9448 case SystemZ::NCImm: in EmitInstrWithCustomInserter()
9449 return emitMemMemWrapper(MI, MBB, SystemZ::NC); in EmitInstrWithCustomInserter()
9450 case SystemZ::OCImm: in EmitInstrWithCustomInserter()
9451 return emitMemMemWrapper(MI, MBB, SystemZ::OC); in EmitInstrWithCustomInserter()
9452 case SystemZ::XCImm: in EmitInstrWithCustomInserter()
9453 case SystemZ::XCReg: in EmitInstrWithCustomInserter()
9454 return emitMemMemWrapper(MI, MBB, SystemZ::XC); in EmitInstrWithCustomInserter()
9455 case SystemZ::CLCImm: in EmitInstrWithCustomInserter()
9456 case SystemZ::CLCReg: in EmitInstrWithCustomInserter()
9457 return emitMemMemWrapper(MI, MBB, SystemZ::CLC); in EmitInstrWithCustomInserter()
9458 case SystemZ::MemsetImmImm: in EmitInstrWithCustomInserter()
9459 case SystemZ::MemsetImmReg: in EmitInstrWithCustomInserter()
9460 case SystemZ::MemsetRegImm: in EmitInstrWithCustomInserter()
9461 case SystemZ::MemsetRegReg: in EmitInstrWithCustomInserter()
9462 return emitMemMemWrapper(MI, MBB, SystemZ::MVC, true/*IsMemset*/); in EmitInstrWithCustomInserter()
9463 case SystemZ::CLSTLoop: in EmitInstrWithCustomInserter()
9464 return emitStringWrapper(MI, MBB, SystemZ::CLST); in EmitInstrWithCustomInserter()
9465 case SystemZ::MVSTLoop: in EmitInstrWithCustomInserter()
9466 return emitStringWrapper(MI, MBB, SystemZ::MVST); in EmitInstrWithCustomInserter()
9467 case SystemZ::SRSTLoop: in EmitInstrWithCustomInserter()
9468 return emitStringWrapper(MI, MBB, SystemZ::SRST); in EmitInstrWithCustomInserter()
9469 case SystemZ::TBEGIN: in EmitInstrWithCustomInserter()
9470 return emitTransactionBegin(MI, MBB, SystemZ::TBEGIN, false); in EmitInstrWithCustomInserter()
9471 case SystemZ::TBEGIN_nofloat: in EmitInstrWithCustomInserter()
9472 return emitTransactionBegin(MI, MBB, SystemZ::TBEGIN, true); in EmitInstrWithCustomInserter()
9473 case SystemZ::TBEGINC: in EmitInstrWithCustomInserter()
9474 return emitTransactionBegin(MI, MBB, SystemZ::TBEGINC, true); in EmitInstrWithCustomInserter()
9475 case SystemZ::LTEBRCompare_Pseudo: in EmitInstrWithCustomInserter()
9476 return emitLoadAndTestCmp0(MI, MBB, SystemZ::LTEBR); in EmitInstrWithCustomInserter()
9477 case SystemZ::LTDBRCompare_Pseudo: in EmitInstrWithCustomInserter()
9478 return emitLoadAndTestCmp0(MI, MBB, SystemZ::LTDBR); in EmitInstrWithCustomInserter()
9479 case SystemZ::LTXBRCompare_Pseudo: in EmitInstrWithCustomInserter()
9480 return emitLoadAndTestCmp0(MI, MBB, SystemZ::LTXBR); in EmitInstrWithCustomInserter()
9482 case SystemZ::PROBED_ALLOCA: in EmitInstrWithCustomInserter()
9499 return &SystemZ::ADDR128BitRegClass; in getRepRegClassFor()
9525 DAG.getMachineNode(SystemZ::EFPC, dl, {MVT::i32, MVT::Other}, Chain), 0); in lowerGET_ROUNDING()