14 #define DEBUG_TYPE "systemz-lower"
33 struct IPMConversion {
34 IPMConversion(
unsigned xorValue, int64_t addValue,
unsigned bit)
35 : XORValue(xorValue), AddValue(addValue),
Bit(bit) {}
65 Subtarget(*tm.getSubtargetImpl()),
TM(tm) {
342 return FromBits > ToBits;
350 return FromBits > ToBits;
359 if (Constraint.size() == 1) {
360 switch (Constraint[0]) {
391 const char *constraint)
const {
396 if (CallOperandVal == NULL)
400 switch (*constraint) {
419 if (
ConstantInt *
C = dyn_cast<ConstantInt>(CallOperandVal))
425 if (
ConstantInt *
C = dyn_cast<ConstantInt>(CallOperandVal))
426 if (isUInt<12>(
C->getZExtValue()))
431 if (
ConstantInt *
C = dyn_cast<ConstantInt>(CallOperandVal))
437 if (
ConstantInt *
C = dyn_cast<ConstantInt>(CallOperandVal))
438 if (isInt<20>(
C->getSExtValue()))
443 if (
ConstantInt *
C = dyn_cast<ConstantInt>(CallOperandVal))
444 if (
C->getZExtValue() == 0x7fffffff)
454 static std::pair<unsigned, const TargetRegisterClass *>
457 assert(*(Constraint.end()-1) ==
'}' &&
"Missing '}'");
459 std::string Suffix(Constraint.data() + 2, Constraint.size() - 2);
460 unsigned Index =
atoi(Suffix.c_str());
461 if (Index < 16 && Map[Index])
462 return std::make_pair(Map[Index], RC);
464 return std::make_pair(0u, static_cast<TargetRegisterClass*>(0));
469 if (Constraint.size() == 1) {
471 switch (Constraint[0]) {
476 return std::make_pair(0U, &SystemZ::GR64BitRegClass);
478 return std::make_pair(0U, &SystemZ::GR128BitRegClass);
479 return std::make_pair(0U, &SystemZ::GR32BitRegClass);
483 return std::make_pair(0U, &SystemZ::ADDR64BitRegClass);
485 return std::make_pair(0U, &SystemZ::ADDR128BitRegClass);
486 return std::make_pair(0U, &SystemZ::ADDR32BitRegClass);
489 return std::make_pair(0U, &SystemZ::GRH32BitRegClass);
493 return std::make_pair(0U, &SystemZ::FP64BitRegClass);
495 return std::make_pair(0U, &SystemZ::FP128BitRegClass);
496 return std::make_pair(0U, &SystemZ::FP32BitRegClass);
499 if (Constraint[0] ==
'{') {
504 if (Constraint[1] ==
'r') {
514 if (Constraint[1] ==
'f') {
530 std::vector<SDValue> &Ops,
533 if (Constraint.length() == 1) {
534 switch (Constraint[0]) {
544 if (isUInt<12>(
C->getZExtValue()))
558 if (isInt<20>(
C->getSExtValue()))
565 if (
C->getZExtValue() == 0x7fffffff)
578 #include "SystemZGenCallingConv.inc"
581 Type *ToType)
const {
653 unsigned NumFixedGPRs = 0;
654 unsigned NumFixedFPRs = 0;
655 for (
unsigned I = 0, E = ArgLocs.
size();
I != E; ++
I) {
668 RC = &SystemZ::GR32BitRegClass;
672 RC = &SystemZ::GR64BitRegClass;
676 RC = &SystemZ::FP32BitRegClass;
680 RC = &SystemZ::FP64BitRegClass;
688 assert(VA.
isMemLoc() &&
"Argument not register or memory");
701 ArgValue = DAG.
getLoad(LocVT, DL, Chain, FIN,
703 false,
false,
false, 0);
718 int64_t StackSize = CCInfo.getNextStackOffset();
723 int64_t RegSaveOffset = TFL->getOffsetOfLocalArea();
736 &SystemZ::FP64BitRegClass);
745 &MemOps[NumFixedFPRs],
746 SystemZ::NumArgFPRs - NumFixedFPRs);
757 for (
unsigned I = 0, E = ArgLocs.
size();
I != E; ++
I) {
764 if (Reg == SystemZ::R6H || Reg == SystemZ::R6L || Reg == SystemZ::R6D)
797 unsigned NumBytes = ArgCCInfo.getNextStackOffset();
808 for (
unsigned I = 0, E = ArgLocs.
size();
I != E; ++
I) {
815 int FI = cast<FrameIndexSDNode>(SpillSlot)->getIndex();
819 ArgValue = SpillSlot;
827 assert(VA.
isMemLoc() &&
"Argument not register or memory");
847 if (!MemOpChains.
empty())
849 &MemOpChains[0], MemOpChains.
size());
861 }
else if (IsTailCall) {
862 Chain = DAG.
getCopyToReg(Chain, DL, SystemZ::R1D, Callee, Glue);
868 for (
unsigned I = 0, E = RegsToPass.
size();
I != E; ++
I) {
870 RegsToPass[
I].second, Glue);
881 for (
unsigned I = 0, E = RegsToPass.
size();
I != E; ++
I)
883 RegsToPass[I].second.getValueType()));
909 for (
unsigned I = 0, E = RetLocs.
size(); I != E; ++
I) {
947 for (
unsigned I = 0, E = RetLocs.
size();
I != E; ++
I) {
952 assert(VA.
isRegLoc() &&
"Can only return in registers!");
959 Chain = DAG.
getCopyToReg(Chain, DL, Reg, RetValue, Glue);
980 case ISD::SET##X: return SystemZ::CCMASK_CMP_##X; \
981 case ISD::SETO##X: return SystemZ::CCMASK_CMP_##X; \
982 case ISD::SETU##X: return SystemZ::CCMASK_CMP_UO | SystemZ::CCMASK_CMP_##X
1019 uint64_t TopBit = uint64_t(1) << 31;
1024 if (CCMask == (CCValid & (SystemZ::CCMASK_0
1032 | SystemZ::CCMASK_3)))
1044 if (CCMask == (CCValid & (SystemZ::CCMASK_0 | SystemZ::CCMASK_3)))
1055 if (CCMask == (CCValid & (SystemZ::CCMASK_0
1057 | SystemZ::CCMASK_3)))
1059 if (CCMask == (CCValid & (SystemZ::CCMASK_0
1061 | SystemZ::CCMASK_3)))
1106 if (NumBits != 8 && NumBits != 16)
1113 uint64_t Mask = (1 << NumBits) - 1;
1116 if (uint64_t(SignedValue) + (1ULL << (NumBits - 1)) > Mask)
1128 Value &= Mask, IsUnsigned =
true;
1129 else if (NumBits == 8) {
1193 unsigned ICmpType) {
1201 if (isa<ConstantFPSDNode>(Op1))
1255 uint64_t Mask, uint64_t CmpVal,
1256 unsigned ICmpType) {
1257 assert(Mask != 0 &&
"ANDs with zero should have been removed by now");
1266 uint64_t High = uint64_t(1) << HighShift;
1280 if (EffectivelyUnsigned && CmpVal <= Low) {
1286 if (EffectivelyUnsigned && CmpVal < Low) {
1294 if (CmpVal == Mask) {
1300 if (EffectivelyUnsigned && CmpVal >= Mask - Low && CmpVal < Mask) {
1306 if (EffectivelyUnsigned && CmpVal > Mask - Low && CmpVal <= Mask) {
1314 if (EffectivelyUnsigned && CmpVal >= Mask - High && CmpVal < High) {
1320 if (EffectivelyUnsigned && CmpVal > Mask - High && CmpVal <= High) {
1329 if (Mask == Low + High) {
1350 unsigned &CCValid,
unsigned &CCMask,
1351 unsigned &ICmpType) {
1371 unsigned NewCCMask, ShiftVal;
1384 MaskVal << ShiftVal,
1414 bool IsUnsigned =
false;
1416 unsigned Opcode, ICmpType = 0;
1436 else if (IsUnsigned)
1478 unsigned Extend,
unsigned Opcode,
1496 unsigned CCValid, CCMask;
1497 SDValue Glue =
emitCmp(TM, DAG, DL, CmpOp0, CmpOp1, CC, CCValid, CCMask);
1502 if (Conversion.XORValue)
1506 if (Conversion.AddValue)
1513 if (Conversion.Bit != 31)
1527 unsigned CCValid, CCMask;
1543 unsigned CCValid, CCMask;
1544 SDValue Flags =
emitCmp(TM, DAG, DL, CmpOp0, CmpOp1, CC, CCValid, CCMask);
1569 uint64_t Anchor = Offset & ~uint64_t(0xfff);
1575 if (Offset != 0 && (Offset & 1) == 0) {
1629 false,
false,
false, 0);
1725 const unsigned NumFields = 4;
1735 unsigned Offset = 0;
1736 for (
unsigned I = 0;
I < NumFields; ++
I) {
1741 MemOps[
I] = DAG.
getStore(Chain, DL, Fields[
I], FieldAddr,
1754 const Value *DstSV = cast<SrcValueSDNode>(Op.
getOperand(3))->getValue();
1755 const Value *SrcSV = cast<SrcValueSDNode>(Op.
getOperand(4))->getValue();
1763 SDValue SystemZTargetLowering::
1786 SDValue Ops[2] = { Result, Chain };
1823 LL, RL, Ops[1], Ops[0]);
1874 Op0, Op1, Ops[1], Ops[0]);
1901 APInt KnownZero[2], KnownOne[2];
1910 if ((Masks[0] >> 32) == 0xffffffff && uint32_t(Masks[1]) == 0xffffffff)
1912 else if ((Masks[1] >> 32) == 0xffffffff && uint32_t(Masks[0]) == 0xffffffff)
1927 int64_t
Value = int32_t(cast<ConstantSDNode>(LowOp)->getZExtValue());
1937 uint64_t Mask = MaskNode->
getZExtValue() | Masks[High];
1938 if ((Mask >> 32) == 0xffffffff)
1956 unsigned Opcode)
const {
1962 if (NarrowVT == WideVT)
1965 int64_t BitSize = NarrowVT.getSizeInBits();
2006 DAG.
getConstant(uint32_t(-1) >> BitSize, WideVT));
2010 SDValue Ops[] = { ChainIn, AlignedAddr, Src2, BitShift, NegBitShift,
2035 if (NarrowVT == WideVT)
2038 int64_t BitSize = NarrowVT.getSizeInBits();
2064 SDValue Ops[] = { ChainIn, AlignedAddr, CmpVal, SwapVal, BitShift,
2090 bool IsData = cast<ConstantSDNode>(Op.
getOperand(4))->getZExtValue();
2095 bool IsWrite = cast<ConstantSDNode>(Op.
getOperand(2))->getZExtValue();
2112 return lowerBR_CC(Op, DAG);
2114 return lowerSELECT_CC(Op, DAG);
2116 return lowerSETCC(Op, DAG);
2118 return lowerGlobalAddress(cast<GlobalAddressSDNode>(Op), DAG);
2120 return lowerGlobalTLSAddress(cast<GlobalAddressSDNode>(Op), DAG);
2122 return lowerBlockAddress(cast<BlockAddressSDNode>(Op), DAG);
2124 return lowerJumpTable(cast<JumpTableSDNode>(Op), DAG);
2126 return lowerConstantPool(cast<ConstantPoolSDNode>(Op), DAG);
2128 return lowerBITCAST(Op, DAG);
2130 return lowerVASTART(Op, DAG);
2132 return lowerVACOPY(Op, DAG);
2134 return lowerDYNAMIC_STACKALLOC(Op, DAG);
2136 return lowerSMUL_LOHI(Op, DAG);
2138 return lowerUMUL_LOHI(Op, DAG);
2140 return lowerSDIVREM(Op, DAG);
2142 return lowerUDIVREM(Op, DAG);
2144 return lowerOR(Op, DAG);
2168 return lowerATOMIC_CMP_SWAP(Op, DAG);
2170 return lowerSTACKSAVE(Op, DAG);
2172 return lowerSTACKRESTORE(Op, DAG);
2174 return lowerPREFETCH(Op, DAG);
2181 #define OPCODE(NAME) case SystemZISD::NAME: return "SystemZISD::" #NAME
2301 BuildMI(MBB, DL, TII->get(SystemZ::BRC))
2316 .addReg(TrueReg).
addMBB(StartMBB)
2330 unsigned StoreOpcode,
unsigned STOCOpcode,
2331 bool Invert)
const {
2350 BuildMI(*MBB, MI, DL, TII->get(STOCOpcode))
2369 BuildMI(MBB, DL, TII->get(SystemZ::BRC))
2378 BuildMI(MBB, DL, TII->get(StoreOpcode))
2394 SystemZTargetLowering::emitAtomicLoadBinary(
MachineInstr *MI,
2398 bool Invert)
const {
2402 bool IsSubWord = (BitSize < 32);
2418 &SystemZ::GR32BitRegClass :
2419 &SystemZ::GR64BitRegClass);
2420 unsigned LOpcode = BitSize <= 32 ? SystemZ::L : SystemZ::LG;
2421 unsigned CSOpcode = BitSize <= 32 ? SystemZ::CS : SystemZ::CSG;
2426 assert(LOpcode && CSOpcode &&
"Displacement out of range");
2431 unsigned NewVal = (BinOpcode || IsSubWord ?
2446 BuildMI(MBB, DL, TII->get(LOpcode), OrigVal)
2460 .addReg(OrigVal).
addMBB(StartMBB)
2463 BuildMI(MBB, DL, TII->get(SystemZ::RLL), RotatedOldVal)
2468 BuildMI(MBB, DL, TII->get(BinOpcode), Tmp)
2472 BuildMI(MBB, DL, TII->get(SystemZ::XILF), RotatedNewVal)
2473 .addReg(Tmp).
addImm(uint32_t(~0 << (32 - BitSize)));
2474 else if (BitSize == 32)
2476 BuildMI(MBB, DL, TII->get(SystemZ::XILF), RotatedNewVal)
2477 .addReg(Tmp).
addImm(~uint32_t(0));
2482 BuildMI(MBB, DL, TII->get(SystemZ::LCGR), Tmp2).addReg(Tmp);
2483 BuildMI(MBB, DL, TII->get(SystemZ::AGHI), RotatedNewVal)
2484 .addReg(Tmp2).
addImm(-1);
2486 }
else if (BinOpcode)
2488 BuildMI(MBB, DL, TII->get(BinOpcode), RotatedNewVal)
2493 BuildMI(MBB, DL, TII->get(SystemZ::RISBG32), RotatedNewVal)
2497 BuildMI(MBB, DL, TII->get(SystemZ::RLL), NewVal)
2499 BuildMI(MBB, DL, TII->get(CSOpcode), Dest)
2501 BuildMI(MBB, DL, TII->get(SystemZ::BRC))
2517 SystemZTargetLowering::emitAtomicLoadMinMax(
MachineInstr *MI,
2519 unsigned CompareOpcode,
2520 unsigned KeepOldMask,
2521 unsigned BitSize)
const {
2525 bool IsSubWord = (BitSize < 32);
2540 &SystemZ::GR32BitRegClass :
2541 &SystemZ::GR64BitRegClass);
2542 unsigned LOpcode = BitSize <= 32 ? SystemZ::L : SystemZ::LG;
2543 unsigned CSOpcode = BitSize <= 32 ? SystemZ::CS : SystemZ::CSG;
2548 assert(LOpcode && CSOpcode &&
"Displacement out of range");
2570 BuildMI(MBB, DL, TII->get(LOpcode), OrigVal)
2581 .addReg(OrigVal).
addMBB(StartMBB)
2584 BuildMI(MBB, DL, TII->get(SystemZ::RLL), RotatedOldVal)
2586 BuildMI(MBB, DL, TII->get(CompareOpcode))
2587 .addReg(RotatedOldVal).
addReg(Src2);
2588 BuildMI(MBB, DL, TII->get(SystemZ::BRC))
2598 BuildMI(MBB, DL, TII->get(SystemZ::RISBG32), RotatedAltVal)
2599 .addReg(RotatedOldVal).
addReg(Src2)
2612 .addReg(RotatedOldVal).
addMBB(LoopMBB)
2615 BuildMI(MBB, DL, TII->get(SystemZ::RLL), NewVal)
2617 BuildMI(MBB, DL, TII->get(CSOpcode), Dest)
2619 BuildMI(MBB, DL, TII->get(SystemZ::BRC))
2631 SystemZTargetLowering::emitAtomicCmpSwapW(
MachineInstr *MI,
2653 assert(LOpcode && CSOpcode &&
"Displacement out of range");
2676 BuildMI(MBB, DL, TII->get(LOpcode), OrigOldVal)
2696 .addReg(OrigOldVal).
addMBB(StartMBB)
2699 .addReg(OrigCmpVal).
addMBB(StartMBB)
2702 .addReg(OrigSwapVal).
addMBB(StartMBB)
2704 BuildMI(MBB, DL, TII->get(SystemZ::RLL), Dest)
2706 BuildMI(MBB, DL, TII->get(SystemZ::RISBG32), RetryCmpVal)
2708 BuildMI(MBB, DL, TII->get(SystemZ::CR))
2709 .addReg(Dest).
addReg(RetryCmpVal);
2710 BuildMI(MBB, DL, TII->get(SystemZ::BRC))
2726 BuildMI(MBB, DL, TII->get(SystemZ::RISBG32), RetrySwapVal)
2728 BuildMI(MBB, DL, TII->get(SystemZ::RLL), StoreVal)
2729 .addReg(RetrySwapVal).
addReg(NegBitShift).
addImm(-BitSize);
2730 BuildMI(MBB, DL, TII->get(CSOpcode), RetryOldVal)
2732 BuildMI(MBB, DL, TII->get(SystemZ::BRC))
2748 bool ClearEven,
unsigned SubReg)
const {
2763 BuildMI(*MBB, MI, DL, TII->get(SystemZ::LLILL), Zero64)
2766 .addReg(In128).
addReg(Zero64).
addImm(SystemZ::subreg_h64);
2777 SystemZTargetLowering::emitMemMemWrapper(
MachineInstr *MI,
2779 unsigned Opcode)
const {
2801 uint64_t StartSrcReg =
forceReg(MI, SrcBase, TII);
2802 uint64_t StartDestReg = (HaveSingleBase ? StartSrcReg :
2807 uint64_t ThisDestReg = (HaveSingleBase ? ThisSrcReg :
2810 uint64_t NextDestReg = (HaveSingleBase ? NextSrcReg :
2813 RC = &SystemZ::GR64BitRegClass;
2841 .addReg(StartDestReg).
addMBB(StartMBB)
2843 if (!HaveSingleBase)
2845 .addReg(StartSrcReg).
addMBB(StartMBB)
2848 .addReg(StartCountReg).
addMBB(StartMBB)
2851 BuildMI(MBB, DL, TII->get(SystemZ::PFD))
2854 BuildMI(MBB, DL, TII->get(Opcode))
2858 BuildMI(MBB, DL, TII->get(SystemZ::BRC))
2876 BuildMI(MBB, DL, TII->get(SystemZ::LA), NextDestReg)
2878 if (!HaveSingleBase)
2879 BuildMI(MBB, DL, TII->get(SystemZ::LA), NextSrcReg)
2881 BuildMI(MBB, DL, TII->get(SystemZ::AGHI), NextCountReg)
2882 .addReg(ThisCountReg).
addImm(-1);
2883 BuildMI(MBB, DL, TII->get(SystemZ::CGHI))
2884 .addReg(NextCountReg).
addImm(0);
2885 BuildMI(MBB, DL, TII->get(SystemZ::BRC))
2897 while (Length > 0) {
2898 uint64_t ThisLength = std::min(Length, uint64_t(256));
2901 if (!isUInt<12>(DestDisp)) {
2908 if (!isUInt<12>(SrcDisp)) {
2915 BuildMI(*MBB, MI, DL, TII->get(Opcode))
2916 .addOperand(DestBase).
addImm(DestDisp).
addImm(ThisLength)
2918 DestDisp += ThisLength;
2919 SrcDisp += ThisLength;
2920 Length -= ThisLength;
2923 if (EndMBB && Length > 0) {
2925 BuildMI(MBB, DL, TII->get(SystemZ::BRC))
2946 SystemZTargetLowering::emitStringWrapper(
MachineInstr *MI,
2948 unsigned Opcode)
const {
2984 .addReg(Start1Reg).
addMBB(StartMBB)
2987 .addReg(Start2Reg).
addMBB(StartMBB)
2990 BuildMI(MBB, DL, TII->get(Opcode))
2993 BuildMI(MBB, DL, TII->get(SystemZ::BRC))
3007 case SystemZ::Select32Mux:
3008 case SystemZ::Select32:
3009 case SystemZ::SelectF32:
3010 case SystemZ::Select64:
3011 case SystemZ::SelectF64:
3012 case SystemZ::SelectF128:
3013 return emitSelect(MI, MBB);
3015 case SystemZ::CondStore8Mux:
3016 return emitCondStore(MI, MBB, SystemZ::STCMux, 0,
false);
3017 case SystemZ::CondStore8MuxInv:
3018 return emitCondStore(MI, MBB, SystemZ::STCMux, 0,
true);
3019 case SystemZ::CondStore16Mux:
3020 return emitCondStore(MI, MBB, SystemZ::STHMux, 0,
false);
3021 case SystemZ::CondStore16MuxInv:
3022 return emitCondStore(MI, MBB, SystemZ::STHMux, 0,
true);
3023 case SystemZ::CondStore8:
3024 return emitCondStore(MI, MBB, SystemZ::STC, 0,
false);
3025 case SystemZ::CondStore8Inv:
3026 return emitCondStore(MI, MBB, SystemZ::STC, 0,
true);
3027 case SystemZ::CondStore16:
3028 return emitCondStore(MI, MBB, SystemZ::STH, 0,
false);
3029 case SystemZ::CondStore16Inv:
3030 return emitCondStore(MI, MBB, SystemZ::STH, 0,
true);
3031 case SystemZ::CondStore32:
3032 return emitCondStore(MI, MBB,
SystemZ::ST, SystemZ::STOC,
false);
3033 case SystemZ::CondStore32Inv:
3034 return emitCondStore(MI, MBB,
SystemZ::ST, SystemZ::STOC,
true);
3035 case SystemZ::CondStore64:
3036 return emitCondStore(MI, MBB, SystemZ::STG, SystemZ::STOCG,
false);
3037 case SystemZ::CondStore64Inv:
3038 return emitCondStore(MI, MBB, SystemZ::STG, SystemZ::STOCG,
true);
3039 case SystemZ::CondStoreF32:
3040 return emitCondStore(MI, MBB, SystemZ::STE, 0,
false);
3041 case SystemZ::CondStoreF32Inv:
3042 return emitCondStore(MI, MBB, SystemZ::STE, 0,
true);
3043 case SystemZ::CondStoreF64:
3044 return emitCondStore(MI, MBB, SystemZ::STD, 0,
false);
3045 case SystemZ::CondStoreF64Inv:
3046 return emitCondStore(MI, MBB, SystemZ::STD, 0,
true);
3048 case SystemZ::AEXT128_64:
3049 return emitExt128(MI, MBB,
false, SystemZ::subreg_l64);
3050 case SystemZ::ZEXT128_32:
3051 return emitExt128(MI, MBB,
true, SystemZ::subreg_l32);
3052 case SystemZ::ZEXT128_64:
3053 return emitExt128(MI, MBB,
true, SystemZ::subreg_l64);
3056 return emitAtomicLoadBinary(MI, MBB, 0, 0);
3057 case SystemZ::ATOMIC_SWAP_32:
3058 return emitAtomicLoadBinary(MI, MBB, 0, 32);
3059 case SystemZ::ATOMIC_SWAP_64:
3060 return emitAtomicLoadBinary(MI, MBB, 0, 64);
3062 case SystemZ::ATOMIC_LOADW_AR:
3063 return emitAtomicLoadBinary(MI, MBB, SystemZ::AR, 0);
3064 case SystemZ::ATOMIC_LOADW_AFI:
3065 return emitAtomicLoadBinary(MI, MBB, SystemZ::AFI, 0);
3066 case SystemZ::ATOMIC_LOAD_AR:
3067 return emitAtomicLoadBinary(MI, MBB, SystemZ::AR, 32);
3068 case SystemZ::ATOMIC_LOAD_AHI:
3069 return emitAtomicLoadBinary(MI, MBB, SystemZ::AHI, 32);
3070 case SystemZ::ATOMIC_LOAD_AFI:
3071 return emitAtomicLoadBinary(MI, MBB, SystemZ::AFI, 32);
3072 case SystemZ::ATOMIC_LOAD_AGR:
3073 return emitAtomicLoadBinary(MI, MBB, SystemZ::AGR, 64);
3074 case SystemZ::ATOMIC_LOAD_AGHI:
3075 return emitAtomicLoadBinary(MI, MBB, SystemZ::AGHI, 64);
3076 case SystemZ::ATOMIC_LOAD_AGFI:
3077 return emitAtomicLoadBinary(MI, MBB, SystemZ::AGFI, 64);
3079 case SystemZ::ATOMIC_LOADW_SR:
3080 return emitAtomicLoadBinary(MI, MBB, SystemZ::SR, 0);
3081 case SystemZ::ATOMIC_LOAD_SR:
3082 return emitAtomicLoadBinary(MI, MBB, SystemZ::SR, 32);
3083 case SystemZ::ATOMIC_LOAD_SGR:
3084 return emitAtomicLoadBinary(MI, MBB, SystemZ::SGR, 64);
3086 case SystemZ::ATOMIC_LOADW_NR:
3087 return emitAtomicLoadBinary(MI, MBB, SystemZ::NR, 0);
3088 case SystemZ::ATOMIC_LOADW_NILH:
3089 return emitAtomicLoadBinary(MI, MBB, SystemZ::NILH, 0);
3090 case SystemZ::ATOMIC_LOAD_NR:
3091 return emitAtomicLoadBinary(MI, MBB, SystemZ::NR, 32);
3092 case SystemZ::ATOMIC_LOAD_NILL:
3093 return emitAtomicLoadBinary(MI, MBB, SystemZ::NILL, 32);
3094 case SystemZ::ATOMIC_LOAD_NILH:
3095 return emitAtomicLoadBinary(MI, MBB, SystemZ::NILH, 32);
3096 case SystemZ::ATOMIC_LOAD_NILF:
3097 return emitAtomicLoadBinary(MI, MBB, SystemZ::NILF, 32);
3098 case SystemZ::ATOMIC_LOAD_NGR:
3099 return emitAtomicLoadBinary(MI, MBB, SystemZ::NGR, 64);
3100 case SystemZ::ATOMIC_LOAD_NILL64:
3101 return emitAtomicLoadBinary(MI, MBB, SystemZ::NILL64, 64);
3102 case SystemZ::ATOMIC_LOAD_NILH64:
3103 return emitAtomicLoadBinary(MI, MBB, SystemZ::NILH64, 64);
3104 case SystemZ::ATOMIC_LOAD_NIHL64:
3105 return emitAtomicLoadBinary(MI, MBB, SystemZ::NIHL64, 64);
3106 case SystemZ::ATOMIC_LOAD_NIHH64:
3107 return emitAtomicLoadBinary(MI, MBB, SystemZ::NIHH64, 64);
3108 case SystemZ::ATOMIC_LOAD_NILF64:
3109 return emitAtomicLoadBinary(MI, MBB, SystemZ::NILF64, 64);
3110 case SystemZ::ATOMIC_LOAD_NIHF64:
3111 return emitAtomicLoadBinary(MI, MBB, SystemZ::NIHF64, 64);
3114 return emitAtomicLoadBinary(MI, MBB,
SystemZ::OR, 0);
3115 case SystemZ::ATOMIC_LOADW_OILH:
3116 return emitAtomicLoadBinary(MI, MBB, SystemZ::OILH, 0);
3118 return emitAtomicLoadBinary(MI, MBB,
SystemZ::OR, 32);
3119 case SystemZ::ATOMIC_LOAD_OILL:
3120 return emitAtomicLoadBinary(MI, MBB, SystemZ::OILL, 32);
3121 case SystemZ::ATOMIC_LOAD_OILH:
3122 return emitAtomicLoadBinary(MI, MBB, SystemZ::OILH, 32);
3123 case SystemZ::ATOMIC_LOAD_OILF:
3124 return emitAtomicLoadBinary(MI, MBB, SystemZ::OILF, 32);
3125 case SystemZ::ATOMIC_LOAD_OGR:
3126 return emitAtomicLoadBinary(MI, MBB, SystemZ::OGR, 64);
3127 case SystemZ::ATOMIC_LOAD_OILL64:
3128 return emitAtomicLoadBinary(MI, MBB, SystemZ::OILL64, 64);
3129 case SystemZ::ATOMIC_LOAD_OILH64:
3130 return emitAtomicLoadBinary(MI, MBB, SystemZ::OILH64, 64);
3131 case SystemZ::ATOMIC_LOAD_OIHL64:
3132 return emitAtomicLoadBinary(MI, MBB, SystemZ::OIHL64, 64);
3133 case SystemZ::ATOMIC_LOAD_OIHH64:
3134 return emitAtomicLoadBinary(MI, MBB, SystemZ::OIHH64, 64);
3135 case SystemZ::ATOMIC_LOAD_OILF64:
3136 return emitAtomicLoadBinary(MI, MBB, SystemZ::OILF64, 64);
3137 case SystemZ::ATOMIC_LOAD_OIHF64:
3138 return emitAtomicLoadBinary(MI, MBB, SystemZ::OIHF64, 64);
3140 case SystemZ::ATOMIC_LOADW_XR:
3141 return emitAtomicLoadBinary(MI, MBB, SystemZ::XR, 0);
3142 case SystemZ::ATOMIC_LOADW_XILF:
3143 return emitAtomicLoadBinary(MI, MBB, SystemZ::XILF, 0);
3144 case SystemZ::ATOMIC_LOAD_XR:
3145 return emitAtomicLoadBinary(MI, MBB, SystemZ::XR, 32);
3146 case SystemZ::ATOMIC_LOAD_XILF:
3147 return emitAtomicLoadBinary(MI, MBB, SystemZ::XILF, 32);
3148 case SystemZ::ATOMIC_LOAD_XGR:
3149 return emitAtomicLoadBinary(MI, MBB, SystemZ::XGR, 64);
3150 case SystemZ::ATOMIC_LOAD_XILF64:
3151 return emitAtomicLoadBinary(MI, MBB, SystemZ::XILF64, 64);
3152 case SystemZ::ATOMIC_LOAD_XIHF64:
3153 return emitAtomicLoadBinary(MI, MBB, SystemZ::XIHF64, 64);
3155 case SystemZ::ATOMIC_LOADW_NRi:
3156 return emitAtomicLoadBinary(MI, MBB, SystemZ::NR, 0,
true);
3157 case SystemZ::ATOMIC_LOADW_NILHi:
3158 return emitAtomicLoadBinary(MI, MBB, SystemZ::NILH, 0,
true);
3159 case SystemZ::ATOMIC_LOAD_NRi:
3160 return emitAtomicLoadBinary(MI, MBB, SystemZ::NR, 32,
true);
3161 case SystemZ::ATOMIC_LOAD_NILLi:
3162 return emitAtomicLoadBinary(MI, MBB, SystemZ::NILL, 32,
true);
3163 case SystemZ::ATOMIC_LOAD_NILHi:
3164 return emitAtomicLoadBinary(MI, MBB, SystemZ::NILH, 32,
true);
3165 case SystemZ::ATOMIC_LOAD_NILFi:
3166 return emitAtomicLoadBinary(MI, MBB, SystemZ::NILF, 32,
true);
3167 case SystemZ::ATOMIC_LOAD_NGRi:
3168 return emitAtomicLoadBinary(MI, MBB, SystemZ::NGR, 64,
true);
3169 case SystemZ::ATOMIC_LOAD_NILL64i:
3170 return emitAtomicLoadBinary(MI, MBB, SystemZ::NILL64, 64,
true);
3171 case SystemZ::ATOMIC_LOAD_NILH64i:
3172 return emitAtomicLoadBinary(MI, MBB, SystemZ::NILH64, 64,
true);
3173 case SystemZ::ATOMIC_LOAD_NIHL64i:
3174 return emitAtomicLoadBinary(MI, MBB, SystemZ::NIHL64, 64,
true);
3175 case SystemZ::ATOMIC_LOAD_NIHH64i:
3176 return emitAtomicLoadBinary(MI, MBB, SystemZ::NIHH64, 64,
true);
3177 case SystemZ::ATOMIC_LOAD_NILF64i:
3178 return emitAtomicLoadBinary(MI, MBB, SystemZ::NILF64, 64,
true);
3179 case SystemZ::ATOMIC_LOAD_NIHF64i:
3180 return emitAtomicLoadBinary(MI, MBB, SystemZ::NIHF64, 64,
true);
3183 return emitAtomicLoadMinMax(MI, MBB, SystemZ::CR,
3185 case SystemZ::ATOMIC_LOAD_MIN_32:
3186 return emitAtomicLoadMinMax(MI, MBB, SystemZ::CR,
3188 case SystemZ::ATOMIC_LOAD_MIN_64:
3189 return emitAtomicLoadMinMax(MI, MBB, SystemZ::CGR,
3193 return emitAtomicLoadMinMax(MI, MBB, SystemZ::CR,
3195 case SystemZ::ATOMIC_LOAD_MAX_32:
3196 return emitAtomicLoadMinMax(MI, MBB, SystemZ::CR,
3198 case SystemZ::ATOMIC_LOAD_MAX_64:
3199 return emitAtomicLoadMinMax(MI, MBB, SystemZ::CGR,
3203 return emitAtomicLoadMinMax(MI, MBB, SystemZ::CLR,
3205 case SystemZ::ATOMIC_LOAD_UMIN_32:
3206 return emitAtomicLoadMinMax(MI, MBB, SystemZ::CLR,
3208 case SystemZ::ATOMIC_LOAD_UMIN_64:
3209 return emitAtomicLoadMinMax(MI, MBB, SystemZ::CLGR,
3213 return emitAtomicLoadMinMax(MI, MBB, SystemZ::CLR,
3215 case SystemZ::ATOMIC_LOAD_UMAX_32:
3216 return emitAtomicLoadMinMax(MI, MBB, SystemZ::CLR,
3218 case SystemZ::ATOMIC_LOAD_UMAX_64:
3219 return emitAtomicLoadMinMax(MI, MBB, SystemZ::CLGR,
3223 return emitAtomicCmpSwapW(MI, MBB);
3224 case SystemZ::MVCSequence:
3225 case SystemZ::MVCLoop:
3227 case SystemZ::NCSequence:
3228 case SystemZ::NCLoop:
3230 case SystemZ::OCSequence:
3231 case SystemZ::OCLoop:
3233 case SystemZ::XCSequence:
3234 case SystemZ::XCLoop:
3236 case SystemZ::CLCSequence:
3237 case SystemZ::CLCLoop:
3239 case SystemZ::CLSTLoop:
3240 return emitStringWrapper(MI, MBB, SystemZ::CLST);
3241 case SystemZ::MVSTLoop:
3242 return emitStringWrapper(MI, MBB, SystemZ::MVST);
3243 case SystemZ::SRSTLoop:
3244 return emitStringWrapper(MI, MBB, SystemZ::SRST);
static unsigned CCMaskForCondCode(ISD::CondCode CC)
bool isUInt< 8 >(uint64_t x)
const unsigned CCMASK_CMP_GT
static unsigned forceReg(MachineInstr *MI, MachineOperand &Base, const SystemZInstrInfo *TII)
void AnalyzeCallResult(const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn Fn)
void push_back(const T &Elt)
const MachineFunction * getParent() const
SDValue getConstant(uint64_t Val, EVT VT, bool isTarget=false)
SDValue getValue(unsigned R) const
LLVMContext * getContext() const
unsigned getVarArgsFrameIndex() const
const unsigned GR32Regs[16]
SDValue getCopyToReg(SDValue Chain, SDLoc dl, unsigned Reg, SDValue N)
uint64_t getZExtValue() const
Get zero extended value.
SDValue getCALLSEQ_END(SDValue Chain, SDValue Op1, SDValue Op2, SDValue InGlue, SDLoc DL)
const int64_t CallFrameSize
static IPMConversion getIPMConversion(unsigned CCValid, unsigned CCMask)
Reloc::Model getRelocationModel() const
static void adjustZeroCmp(SelectionDAG &DAG, bool &IsUnsigned, SDValue &CmpOp0, SDValue &CmpOp1, unsigned &CCMask)
LocInfo getLocInfo() const
virtual SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool IsVarArg, const SmallVectorImpl< ISD::OutputArg > &Outs, const SmallVectorImpl< SDValue > &OutVals, SDLoc DL, SelectionDAG &DAG) const LLVM_OVERRIDE
const unsigned CCMASK_FCMP
const unsigned FP128Regs[16]
unsigned odd128(bool Is32bit)
SDVTList getVTList() const
const SDValue & getVal() const
unsigned createVirtualRegister(const TargetRegisterClass *RegClass)
virtual TargetLowering::ConstraintWeight getSingleConstraintMatchWeight(AsmOperandInfo &info, const char *constraint) const LLVM_OVERRIDE
void addLiveIn(unsigned Reg, unsigned vreg=0)
static bool isImmHH(uint64_t Val)
enable_if_c<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
bool isPC32DBLSymbol(const GlobalValue *GV, Reloc::Model RM, CodeModel::Model CM) const
unsigned addLiveIn(unsigned PReg, const TargetRegisterClass *RC)
void AnalyzeFormalArguments(const SmallVectorImpl< ISD::InputArg > &Ins, CCAssignFn Fn)
virtual ConstraintType getConstraintType(const std::string &Constraint) const
Given a constraint, return the type of constraint it is for this target.
virtual const SystemZInstrInfo * getInstrInfo() const LLVM_OVERRIDE
const GlobalValue * getGlobal() const
void addLiveIn(unsigned Reg)
virtual bool allowsUnalignedMemoryAccesses(EVT VT, bool *Fast) const LLVM_OVERRIDE
Determine if the target supports unaligned memory accesses.
void setBooleanVectorContents(BooleanContent Ty)
int64_t getOffset() const
void transferSuccessorsAndUpdatePHIs(MachineBasicBlock *fromMBB)
const SDValue & getOperand(unsigned Num) const
const unsigned FP32Regs[16]
static MachinePointerInfo getConstantPool()
SDValue getTargetExternalSymbol(const char *Sym, EVT VT, unsigned char TargetFlags=0)
void ComputeMaskedBits(SDValue Op, APInt &KnownZero, APInt &KnownOne, unsigned Depth=0) const
virtual SDValue LowerCall(CallLoweringInfo &CLI, SmallVectorImpl< SDValue > &InVals) const LLVM_OVERRIDE
const SDValue & getBasePtr() const
SDValue getConstantPool(const Constant *C, EVT VT, unsigned Align=0, int Offs=0, bool isT=false, unsigned char TargetFlags=0)
const unsigned CCMASK_ICMP
virtual bool mayBeEmittedAsTailCall(CallInst *CI) const LLVM_OVERRIDE
virtual const TargetFrameLowering * getFrameLowering() const LLVM_OVERRIDE
void setTruncStoreAction(MVT ValVT, MVT MemVT, LegalizeAction Action)
static MachinePointerInfo getFixedStack(int FI, int64_t offset=0)
virtual bool isTruncateFree(Type *, Type *) const LLVM_OVERRIDE
static MachineBasicBlock * splitBlockAfter(MachineInstr *MI, MachineBasicBlock *MBB)
SDValue getLoad(EVT VT, SDLoc dl, SDValue Chain, SDValue Ptr, MachinePointerInfo PtrInfo, bool isVolatile, bool isNonTemporal, bool isInvariant, unsigned Alignment, const MDNode *TBAAInfo=0, const MDNode *Ranges=0)
bool isVector() const
isVector - Return true if this is a vector value type.
bool hasLoadStoreOnCond() const
SDValue getStore(SDValue Chain, SDLoc dl, SDValue Val, SDValue Ptr, MachinePointerInfo PtrInfo, bool isVolatile, bool isNonTemporal, unsigned Alignment, const MDNode *TBAAInfo=0)
int64_t getOffset() const
const HexagonInstrInfo * TII
static MachineOperand CreateReg(unsigned Reg, bool isDef, bool isImp=false, bool isKill=false, bool isDead=false, bool isUndef=false, bool isEarlyClobber=false, unsigned SubReg=0, bool isDebug=false, bool isInternalRead=false)
static void lowerMUL_LOHI32(SelectionDAG &DAG, SDLoc DL, unsigned Extend, SDValue Op0, SDValue Op1, SDValue &Hi, SDValue &Lo)
const unsigned CCMASK_TM_MSB_0
#define llvm_unreachable(msg)
void setVarArgsFirstGPR(unsigned GPR)
MachineFunction & getMachineFunction() const
bool isReg() const
isReg - Tests if this is a MO_Register operand.
SDValue getTargetGlobalAddress(const GlobalValue *GV, SDLoc DL, EVT VT, int64_t offset=0, unsigned char TargetFlags=0)
EVT getScalarType() const
Abstract Stack Frame Information.
static SDValue convertLocVTToValVT(SelectionDAG &DAG, SDLoc DL, CCValAssign &VA, SDValue Chain, SDValue Value)
void setOperationAction(unsigned Op, MVT VT, LegalizeAction Action)
virtual SDValue LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::InputArg > &Ins, SDLoc DL, SelectionDAG &DAG, SmallVectorImpl< SDValue > &InVals) const LLVM_OVERRIDE
SDVTList getVTList(EVT VT)
virtual MVT getPointerTy(uint32_t=0) const
enable_if_c< std::numeric_limits< T >::is_integer &&!std::numeric_limits< T >::is_signed, std::size_t >::type countLeadingZeros(T Val, ZeroBehavior ZB=ZB_Width)
Count number of 0's from the most significant bit to the least stopping at the first 1...
ID
LLVM Calling Convention Representation.
const MachineInstrBuilder & addImm(int64_t Val) const
bool isInteger() const
isInteger - Return true if this is an integer, or a vector integer type.
SmallVector< ISD::InputArg, 32 > Ins
int atoi(const char *str);
SDValue getCALLSEQ_START(SDValue Chain, SDValue Op, SDLoc DL)
unsigned getLocReg() const
size_t array_lengthof(T(&)[N])
Find the length of an array.
bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const
virtual bool allowTruncateForTailCall(Type *, Type *) const LLVM_OVERRIDE
enable_if_c< std::numeric_limits< T >::is_integer &&!std::numeric_limits< T >::is_signed, std::size_t >::type countTrailingZeros(T Val, ZeroBehavior ZB=ZB_Width)
Count number of 0's from the least significant bit to the most stopping at the first 1...
This contains information for each constraint that we are lowering.
Simple integer binary arithmetic operators.
SmallVector< ISD::OutputArg, 32 > Outs
static SDValue convertValVTToLocVT(SelectionDAG &DAG, SDLoc DL, CCValAssign &VA, SDValue Value)
const unsigned NumArgFPRs
bool isFloatingPointTy() const
MachineConstantPoolValue * getMachineCPVal() const
virtual std::pair< unsigned, const TargetRegisterClass * > getRegForInlineAsmConstraint(const std::string &Constraint, MVT VT) const
const unsigned CCMASK_ANY
EVT getMemoryVT() const
getMemoryVT - Return the type of the in-memory value.
virtual TargetLowering::ConstraintType getConstraintType(const std::string &Constraint) const LLVM_OVERRIDE
Given a constraint, return the type of constraint it is for this target.
const unsigned CCMASK_CS_NE
const unsigned CCMASK_TM_SOME_0
const unsigned CCMASK_TM_ALL_1
const BasicBlock * getBasicBlock() const
virtual bool isFPImmLegal(const APFloat &Imm, EVT VT) const LLVM_OVERRIDE
const SDValue & getBasePtr() const
const MachineBasicBlock * getParent() const
SDNode * getNode() const
get the SDNode which holds the desired result
bundle_iterator< MachineInstr, instr_iterator > iterator
A self-contained host- and target-independent arbitrary-precision floating-point software implementat...
static void adjustForTestUnderMask(SelectionDAG &DAG, unsigned &Opcode, SDValue &CmpOp0, SDValue &CmpOp1, unsigned &CCValid, unsigned &CCMask, unsigned &ICmpType)
bool isTypeLegal(EVT VT) const
unsigned getStoreSizeInBits() const
unsigned getOpcodeForOffset(unsigned Opcode, int64_t Offset) const
MachineBasicBlock * CreateMachineBasicBlock(const BasicBlock *bb=0)
bool isMachineConstantPoolEntry() const
CodeModel::Model getCodeModel() const
static SDValue emitCmp(const SystemZTargetMachine &TM, SelectionDAG &DAG, SDLoc DL, SDValue CmpOp0, SDValue CmpOp1, ISD::CondCode Cond, unsigned &CCValid, unsigned &CCMask)
const SDValue & getOperand(unsigned i) const
virtual const char * getTargetNodeName(unsigned Opcode) const LLVM_OVERRIDE
This method returns the name of a target specific DAG node.
void addRegisterClass(MVT VT, const TargetRegisterClass *RC)
bool isNonTemporal() const
static bool isNaturalMemoryOperand(SDValue Op, unsigned ICmpType)
LLVM Constant Representation.
const Constant * getConstVal() const
const MachineOperand & getOperand(unsigned i) const
const unsigned CCMASK_CMP_LE
void setBooleanContents(BooleanContent Ty)
unsigned getNumExplicitOperands() const
ItTy next(ItTy it, Dist n)
SDValue getCopyFromReg(SDValue Chain, SDLoc dl, unsigned Reg, EVT VT)
void setRegSaveFrameIndex(unsigned FI)
static bool shouldSwapCmpOperands(SDValue Op0, SDValue Op1, unsigned ICmpType)
unsigned getOpcode() const
const unsigned CCMASK_TM_MSB_1
const unsigned CCMASK_CMP_LT
Bit counting operators with an undefined result for zero inputs.
MachineInstrBuilder BuildMI(MachineFunction &MF, DebugLoc DL, const MCInstrDesc &MCID)
virtual bool isFMAFasterThanFMulAndFAdd(EVT VT) const LLVM_OVERRIDE
unsigned getStackPointerRegisterToSaveRestore() const
static bool isImmLH(uint64_t Val)
const BlockAddress * getBlockAddress() const
SDValue CreateStackTemporary(EVT VT, unsigned minAlign=1)
const unsigned CCMASK_TM_MIXED_MSB_0
const MachinePointerInfo & getPointerInfo() const
void setIsKill(bool Val=true)
SDValue getMemcpy(SDValue Chain, SDLoc dl, SDValue Dst, SDValue Src, SDValue Size, unsigned Align, bool isVol, bool AlwaysInline, MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo)
void setLoadExtAction(unsigned ExtType, MVT VT, LegalizeAction Action)
SDValue getTargetConstantPool(const Constant *C, EVT VT, unsigned Align=0, int Offset=0, unsigned char TargetFlags=0)
SDValue getTargetJumpTable(int JTI, EVT VT, unsigned char TargetFlags=0)
Class for constant integers.
virtual std::pair< unsigned, const TargetRegisterClass * > getRegForInlineAsmConstraint(const std::string &Constraint, MVT VT) const LLVM_OVERRIDE
void setVarArgsFrameIndex(unsigned FI)
void setExceptionPointerRegister(unsigned R)
SDValue getTargetInsertSubreg(int SRIdx, SDLoc DL, EVT VT, SDValue Operand, SDValue Subreg)
const unsigned CCMASK_CMP_EQ
SDValue getExtLoad(ISD::LoadExtType ExtType, SDLoc dl, EVT VT, SDValue Chain, SDValue Ptr, MachinePointerInfo PtrInfo, EVT MemVT, bool isVolatile, bool isNonTemporal, unsigned Alignment, const MDNode *TBAAInfo=0)
const unsigned ArgFPRs[NumArgFPRs]
virtual const SystemZSubtarget * getSubtargetImpl() const LLVM_OVERRIDE
CCValAssign - Represent assignment of one arg/retval to a location.
const unsigned FP64Regs[16]
static bool isSimpleShift(SDValue N, unsigned &ShiftVal)
SDValue getIntPtrConstant(uint64_t Val, bool isTarget=false)
const SDValue & getChain() const
static std::pair< unsigned, const TargetRegisterClass * > parseRegisterNumber(const std::string &Constraint, const TargetRegisterClass *RC, const unsigned *Map)
const unsigned CCMASK_CMP_O
const unsigned GR128Regs[16]
MachineMemOperand * getMemOperand() const
const unsigned CCMASK_CMP_NE
MachineFrameInfo * getFrameInfo()
const unsigned GR64Regs[16]
const unsigned CCMASK_TM_MIXED_MSB_1
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
virtual MachineBasicBlock * EmitInstrWithCustomInserter(MachineInstr *MI, MachineBasicBlock *BB) const LLVM_OVERRIDE
ISD::LoadExtType getExtensionType() const
Class for arbitrary precision integers.
SDValue getMemIntrinsicNode(unsigned Opcode, SDLoc dl, const EVT *VTs, unsigned NumVTs, const SDValue *Ops, unsigned NumOps, EVT MemVT, MachinePointerInfo PtrInfo, unsigned Align=0, bool Vol=false, bool ReadMem=true, bool WriteMem=true)
void computeRegisterProperties()
void setExceptionSelectorRegister(unsigned R)
void setMinFunctionAlignment(unsigned Align)
Set the target's minimum function alignment (in log2(bytes))
int64_t getSExtValue() const
void setVarArgsFirstFPR(unsigned FPR)
ZERO_EXTEND - Used for integer types, zeroing the new bits.
void AnalyzeCallOperands(const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn)
SDValue getNode(unsigned Opcode, SDLoc DL, EVT VT)
ANY_EXTEND - Used for integer types. The high bits are undefined.
const unsigned CCMASK_CMP_GE
static MachineOperand earlyUseOperand(MachineOperand Op)
virtual EVT getSetCCResultType(LLVMContext &, EVT) const LLVM_OVERRIDE
static MachineBasicBlock * splitBlockBefore(MachineInstr *MI, MachineBasicBlock *MBB)
static MachinePointerInfo getGOT()
SDValue getTargetBlockAddress(const BlockAddress *BA, EVT VT, int64_t Offset=0, unsigned char TargetFlags=0)
SmallVector< SDValue, 32 > OutVals
static void lowerGR128Binary(SelectionDAG &DAG, SDLoc DL, EVT VT, unsigned Extend, unsigned Opcode, SDValue Op0, SDValue Op1, SDValue &Even, SDValue &Odd)
static MachineBasicBlock * emitBlockAfter(MachineBasicBlock *MBB)
Bitwise operators - logical and, logical or, logical xor.
pointer data()
data - Return a pointer to the vector's buffer, even if empty().
void splice(iterator Where, MachineBasicBlock *Other, iterator From)
MachineRegisterInfo & getRegInfo()
virtual void LowerAsmOperandForConstraint(SDValue Op, std::string &Constraint, std::vector< SDValue > &Ops, SelectionDAG &DAG) const
static bool is32Bit(EVT VT)
IMPLICIT_DEF - This is the MachineInstr-level equivalent of undef.
unsigned getSizeInBits() const
getSizeInBits - Return the size of the specified value type in bits.
void AnalyzeReturn(const SmallVectorImpl< ISD::OutputArg > &Outs, CCAssignFn Fn)
unsigned MaxStoresPerMemcpyOptSize
void setStackPointerRegisterToSaveRestore(unsigned R)
MachineSDNode * getMachineNode(unsigned Opcode, SDLoc dl, EVT VT)
unsigned getPrimitiveSizeInBits() const
virtual void LowerAsmOperandForConstraint(SDValue Op, std::string &Constraint, std::vector< SDValue > &Ops, SelectionDAG &DAG) const LLVM_OVERRIDE
bool isInt< 16 >(int64_t x)
unsigned MaxStoresPerMemcpy
Specify maximum bytes of store instructions per memcpy call.
unsigned getRegSaveFrameIndex() const
static bool canUseSiblingCall(CCState ArgCCInfo, SmallVectorImpl< CCValAssign > &ArgLocs)
static unsigned getTestUnderMaskCond(unsigned BitSize, unsigned CCMask, uint64_t Mask, uint64_t CmpVal, unsigned ICmpType)
TLSModel::Model getTLSModel(const GlobalValue *GV) const
unsigned getReg() const
getReg - Returns the register number.
bool isFloatingPoint() const
isFloatingPoint - Return true if this is a FP, or a vector FP type.
void insert(iterator MBBI, MachineBasicBlock *MBB)
SDValue getFrameIndex(int FI, EVT VT, bool isTarget=false)
unsigned getAlignment() const
void setSchedulingPreference(Sched::Preference Pref)
Specify the target scheduling preference.
SDValue getTargetExtractSubreg(int SRIdx, SDLoc DL, EVT VT, SDValue Operand)
LLVM Value Representation.
SDValue getRegister(unsigned Reg, EVT VT)
unsigned even128(bool Is32bit)
SystemZTargetLowering(SystemZTargetMachine &TM)
unsigned getVarArgsFirstGPR() const
bool isZero() const
Returns true if and only if the float is plus or minus zero.
const MachineInstrBuilder & addMBB(MachineBasicBlock *MBB, unsigned char TargetFlags=0) const
SDValue getValueType(EVT)
bool isUInt< 16 >(uint64_t x)
virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const LLVM_OVERRIDE
unsigned ComputeNumSignBits(SDValue Op, unsigned Depth=0) const
const MachineInstrBuilder & addOperand(const MachineOperand &MO) const
BasicBlockListType::iterator iterator
static bool isImmLL(uint64_t Val)
virtual bool isLegalAddressingMode(const AddrMode &AM, Type *Ty) const LLVM_OVERRIDE
bool hasFPExtension() const
SDValue getMergeValues(const SDValue *Ops, unsigned NumOps, SDLoc dl)
getMergeValues - Create a MERGE_VALUES node from the given operands.
unsigned MaxStoresPerMemset
Specify maximum number of store instructions per memset call.
unsigned MaxStoresPerMemsetOptSize
const MCRegisterInfo & MRI
SDValue getTargetConstant(uint64_t Val, EVT VT)
unsigned getLocMemOffset() const
SDValue getEntryNode() const
bool isIdenticalTo(const MachineOperand &Other) const
int CreateFixedObject(uint64_t Size, int64_t SPOffset, bool Immutable)
const unsigned CCMASK_TM_ALL_0
bool SignBitIsZero(SDValue Op, unsigned Depth=0) const
TRUNCATE - Completely drop the high bits.
unsigned getAlignment() const
virtual ConstraintWeight getSingleConstraintMatchWeight(AsmOperandInfo &info, const char *constraint) const
const MachineInstrBuilder & addReg(unsigned RegNo, unsigned flags=0, unsigned SubReg=0) const
static void adjustSubwordCmp(SelectionDAG &DAG, bool &IsUnsigned, SDValue &CmpOp0, SDValue &CmpOp1, unsigned &CCMask)
void addSuccessor(MachineBasicBlock *succ, uint32_t weight=0)
EVT changeVectorElementTypeToInteger() const
const unsigned CCMASK_TM_SOME_1
DebugLoc getDebugLoc() const
unsigned getVarArgsFirstFPR() const
static SystemZConstantPoolValue * Create(const GlobalValue *GV, SystemZCP::SystemZCPModifier Modifier)
const unsigned CCMASK_CMP_UO
uint64_t getZExtValue() const
static bool isImmHL(uint64_t Val)