64 #define DEBUG_TYPE "nvptx-lower" 76 cl::desc(
"NVPTX Specific: FMA contraction (0: don't do it" 77 " 1: do it 2: do it aggressively"),
82 cl::desc(
"NVPTX Specifies: 0 use div.approx, 1 use div.full, 2 use" 83 " IEEE Compliant F32 div.rnd if available."),
88 cl::desc(
"NVPTX Specific: 0 use sqrt.approx, 1 use sqrt.rn."),
93 cl::desc(
"NVPTX Specific: Flush f32 subnormals to sign-preserving zero."),
166 uint64_t StartingOffset = 0) {
176 Offsets->push_back(StartingOffset + 0);
177 Offsets->push_back(StartingOffset + 8);
184 for (
unsigned i = 0, e = TempVTs.
size(); i != e; ++i) {
186 uint64_t Off = TempOffsets[i];
195 if (EltVT ==
MVT::f16 && NumElts % 2 == 0) {
199 for (
unsigned j = 0; j != NumElts; ++j) {
228 if (AccessSize > ParamAlignment)
231 if (Offsets[Idx] & (AccessSize - 1))
234 EVT EltVT = ValueVTs[Idx];
238 if (EltSize >= AccessSize)
241 unsigned NumElts = AccessSize / EltSize;
243 if (AccessSize != EltSize * NumElts)
247 if (Idx + NumElts > ValueVTs.
size())
251 if (NumElts != 4 && NumElts != 2)
254 for (
unsigned j = Idx + 1; j < Idx + NumElts; ++j) {
256 if (ValueVTs[j] != EltVT)
260 if (Offsets[j] - Offsets[j - 1] != EltSize)
288 unsigned ParamAlignment) {
295 for (
int I = 0,
E = ValueVTs.
size();
I !=
E; ++
I) {
298 for (
unsigned AccessSize : {16, 8, 4, 2}) {
300 I, AccessSize, ValueVTs, Offsets, ParamAlignment);
309 assert(
I + 1 <
E &&
"Not enough elements.");
315 assert(
I + 3 <
E &&
"Not enough elements.");
579 return "NVPTXISD::CALL";
581 return "NVPTXISD::RET_FLAG";
583 return "NVPTXISD::LOAD_PARAM";
585 return "NVPTXISD::Wrapper";
587 return "NVPTXISD::DeclareParam";
589 return "NVPTXISD::DeclareScalarParam";
591 return "NVPTXISD::DeclareRet";
593 return "NVPTXISD::DeclareScalarRet";
595 return "NVPTXISD::DeclareRetParam";
597 return "NVPTXISD::PrintCall";
599 return "NVPTXISD::PrintConvergentCall";
601 return "NVPTXISD::PrintCallUni";
603 return "NVPTXISD::PrintConvergentCallUni";
605 return "NVPTXISD::LoadParam";
607 return "NVPTXISD::LoadParamV2";
609 return "NVPTXISD::LoadParamV4";
611 return "NVPTXISD::StoreParam";
613 return "NVPTXISD::StoreParamV2";
615 return "NVPTXISD::StoreParamV4";
617 return "NVPTXISD::StoreParamS32";
619 return "NVPTXISD::StoreParamU32";
621 return "NVPTXISD::CallArgBegin";
623 return "NVPTXISD::CallArg";
625 return "NVPTXISD::LastCallArg";
627 return "NVPTXISD::CallArgEnd";
629 return "NVPTXISD::CallVoid";
631 return "NVPTXISD::CallVal";
633 return "NVPTXISD::CallSymbol";
635 return "NVPTXISD::Prototype";
637 return "NVPTXISD::MoveParam";
639 return "NVPTXISD::StoreRetval";
641 return "NVPTXISD::StoreRetvalV2";
643 return "NVPTXISD::StoreRetvalV4";
645 return "NVPTXISD::PseudoUseParam";
647 return "NVPTXISD::RETURN";
649 return "NVPTXISD::CallSeqBegin";
651 return "NVPTXISD::CallSeqEnd";
653 return "NVPTXISD::CallPrototype";
655 return "NVPTXISD::LoadV2";
657 return "NVPTXISD::LoadV4";
659 return "NVPTXISD::LDGV2";
661 return "NVPTXISD::LDGV4";
663 return "NVPTXISD::LDUV2";
665 return "NVPTXISD::LDUV4";
667 return "NVPTXISD::StoreV2";
669 return "NVPTXISD::StoreV4";
671 return "NVPTXISD::FUN_SHFL_CLAMP";
673 return "NVPTXISD::FUN_SHFR_CLAMP";
675 return "NVPTXISD::IMAD";
677 return "NVPTXISD::SETP_F16X2";
679 return "NVPTXISD::Dummy";
681 return "NVPTXISD::MUL_WIDE_SIGNED";
683 return "NVPTXISD::MUL_WIDE_UNSIGNED";
687 return "NVPTXISD::Tex1DFloatFloatLevel";
689 return "NVPTXISD::Tex1DFloatFloatGrad";
693 return "NVPTXISD::Tex1DS32FloatLevel";
695 return "NVPTXISD::Tex1DS32FloatGrad";
699 return "NVPTXISD::Tex1DU32FloatLevel";
701 return "NVPTXISD::Tex1DU32FloatGrad";
705 return "NVPTXISD::Tex1DArrayFloatFloatLevel";
707 return "NVPTXISD::Tex1DArrayFloatFloatGrad";
711 return "NVPTXISD::Tex1DArrayS32FloatLevel";
713 return "NVPTXISD::Tex1DArrayS32FloatGrad";
717 return "NVPTXISD::Tex1DArrayU32FloatLevel";
719 return "NVPTXISD::Tex1DArrayU32FloatGrad";
723 return "NVPTXISD::Tex2DFloatFloatLevel";
725 return "NVPTXISD::Tex2DFloatFloatGrad";
729 return "NVPTXISD::Tex2DS32FloatLevel";
731 return "NVPTXISD::Tex2DS32FloatGrad";
735 return "NVPTXISD::Tex2DU32FloatLevel";
737 return "NVPTXISD::Tex2DU32FloatGrad";
741 return "NVPTXISD::Tex2DArrayFloatFloatLevel";
743 return "NVPTXISD::Tex2DArrayFloatFloatGrad";
747 return "NVPTXISD::Tex2DArrayS32FloatLevel";
749 return "NVPTXISD::Tex2DArrayS32FloatGrad";
753 return "NVPTXISD::Tex2DArrayU32FloatLevel";
755 return "NVPTXISD::Tex2DArrayU32FloatGrad";
759 return "NVPTXISD::Tex3DFloatFloatLevel";
761 return "NVPTXISD::Tex3DFloatFloatGrad";
765 return "NVPTXISD::Tex3DS32FloatLevel";
767 return "NVPTXISD::Tex3DS32FloatGrad";
771 return "NVPTXISD::Tex3DU32FloatLevel";
773 return "NVPTXISD::Tex3DU32FloatGrad";
776 return "NVPTXISD::TexCubeFloatFloatLevel";
779 return "NVPTXISD::TexCubeS32FloatLevel";
782 return "NVPTXISD::TexCubeU32FloatLevel";
784 return "NVPTXISD::TexCubeArrayFloatFloat";
786 return "NVPTXISD::TexCubeArrayFloatFloatLevel";
788 return "NVPTXISD::TexCubeArrayS32Float";
790 return "NVPTXISD::TexCubeArrayS32FloatLevel";
792 return "NVPTXISD::TexCubeArrayU32Float";
794 return "NVPTXISD::TexCubeArrayU32FloatLevel";
796 return "NVPTXISD::Tld4R2DFloatFloat";
798 return "NVPTXISD::Tld4G2DFloatFloat";
800 return "NVPTXISD::Tld4B2DFloatFloat";
802 return "NVPTXISD::Tld4A2DFloatFloat";
804 return "NVPTXISD::Tld4R2DS64Float";
806 return "NVPTXISD::Tld4G2DS64Float";
808 return "NVPTXISD::Tld4B2DS64Float";
810 return "NVPTXISD::Tld4A2DS64Float";
812 return "NVPTXISD::Tld4R2DU64Float";
814 return "NVPTXISD::Tld4G2DU64Float";
816 return "NVPTXISD::Tld4B2DU64Float";
818 return "NVPTXISD::Tld4A2DU64Float";
821 return "NVPTXISD::TexUnified1DFloatS32";
823 return "NVPTXISD::TexUnified1DFloatFloat";
825 return "NVPTXISD::TexUnified1DFloatFloatLevel";
827 return "NVPTXISD::TexUnified1DFloatFloatGrad";
829 return "NVPTXISD::TexUnified1DS32S32";
831 return "NVPTXISD::TexUnified1DS32Float";
833 return "NVPTXISD::TexUnified1DS32FloatLevel";
835 return "NVPTXISD::TexUnified1DS32FloatGrad";
837 return "NVPTXISD::TexUnified1DU32S32";
839 return "NVPTXISD::TexUnified1DU32Float";
841 return "NVPTXISD::TexUnified1DU32FloatLevel";
843 return "NVPTXISD::TexUnified1DU32FloatGrad";
845 return "NVPTXISD::TexUnified1DArrayFloatS32";
847 return "NVPTXISD::TexUnified1DArrayFloatFloat";
849 return "NVPTXISD::TexUnified1DArrayFloatFloatLevel";
851 return "NVPTXISD::TexUnified1DArrayFloatFloatGrad";
853 return "NVPTXISD::TexUnified1DArrayS32S32";
855 return "NVPTXISD::TexUnified1DArrayS32Float";
857 return "NVPTXISD::TexUnified1DArrayS32FloatLevel";
859 return "NVPTXISD::TexUnified1DArrayS32FloatGrad";
861 return "NVPTXISD::TexUnified1DArrayU32S32";
863 return "NVPTXISD::TexUnified1DArrayU32Float";
865 return "NVPTXISD::TexUnified1DArrayU32FloatLevel";
867 return "NVPTXISD::TexUnified1DArrayU32FloatGrad";
869 return "NVPTXISD::TexUnified2DFloatS32";
871 return "NVPTXISD::TexUnified2DFloatFloat";
873 return "NVPTXISD::TexUnified2DFloatFloatLevel";
875 return "NVPTXISD::TexUnified2DFloatFloatGrad";
877 return "NVPTXISD::TexUnified2DS32S32";
879 return "NVPTXISD::TexUnified2DS32Float";
881 return "NVPTXISD::TexUnified2DS32FloatLevel";
883 return "NVPTXISD::TexUnified2DS32FloatGrad";
885 return "NVPTXISD::TexUnified2DU32S32";
887 return "NVPTXISD::TexUnified2DU32Float";
889 return "NVPTXISD::TexUnified2DU32FloatLevel";
891 return "NVPTXISD::TexUnified2DU32FloatGrad";
893 return "NVPTXISD::TexUnified2DArrayFloatS32";
895 return "NVPTXISD::TexUnified2DArrayFloatFloat";
897 return "NVPTXISD::TexUnified2DArrayFloatFloatLevel";
899 return "NVPTXISD::TexUnified2DArrayFloatFloatGrad";
901 return "NVPTXISD::TexUnified2DArrayS32S32";
903 return "NVPTXISD::TexUnified2DArrayS32Float";
905 return "NVPTXISD::TexUnified2DArrayS32FloatLevel";
907 return "NVPTXISD::TexUnified2DArrayS32FloatGrad";
909 return "NVPTXISD::TexUnified2DArrayU32S32";
911 return "NVPTXISD::TexUnified2DArrayU32Float";
913 return "NVPTXISD::TexUnified2DArrayU32FloatLevel";
915 return "NVPTXISD::TexUnified2DArrayU32FloatGrad";
917 return "NVPTXISD::TexUnified3DFloatS32";
919 return "NVPTXISD::TexUnified3DFloatFloat";
921 return "NVPTXISD::TexUnified3DFloatFloatLevel";
923 return "NVPTXISD::TexUnified3DFloatFloatGrad";
925 return "NVPTXISD::TexUnified3DS32S32";
927 return "NVPTXISD::TexUnified3DS32Float";
929 return "NVPTXISD::TexUnified3DS32FloatLevel";
931 return "NVPTXISD::TexUnified3DS32FloatGrad";
933 return "NVPTXISD::TexUnified3DU32S32";
935 return "NVPTXISD::TexUnified3DU32Float";
937 return "NVPTXISD::TexUnified3DU32FloatLevel";
939 return "NVPTXISD::TexUnified3DU32FloatGrad";
941 return "NVPTXISD::TexUnifiedCubeFloatFloat";
943 return "NVPTXISD::TexUnifiedCubeFloatFloatLevel";
945 return "NVPTXISD::TexUnifiedCubeS32Float";
947 return "NVPTXISD::TexUnifiedCubeS32FloatLevel";
949 return "NVPTXISD::TexUnifiedCubeU32Float";
951 return "NVPTXISD::TexUnifiedCubeU32FloatLevel";
953 return "NVPTXISD::TexUnifiedCubeArrayFloatFloat";
955 return "NVPTXISD::TexUnifiedCubeArrayFloatFloatLevel";
957 return "NVPTXISD::TexUnifiedCubeArrayS32Float";
959 return "NVPTXISD::TexUnifiedCubeArrayS32FloatLevel";
961 return "NVPTXISD::TexUnifiedCubeArrayU32Float";
963 return "NVPTXISD::TexUnifiedCubeArrayU32FloatLevel";
965 return "NVPTXISD::Tld4UnifiedR2DFloatFloat";
967 return "NVPTXISD::Tld4UnifiedG2DFloatFloat";
969 return "NVPTXISD::Tld4UnifiedB2DFloatFloat";
971 return "NVPTXISD::Tld4UnifiedA2DFloatFloat";
973 return "NVPTXISD::Tld4UnifiedR2DS64Float";
975 return "NVPTXISD::Tld4UnifiedG2DS64Float";
977 return "NVPTXISD::Tld4UnifiedB2DS64Float";
979 return "NVPTXISD::Tld4UnifiedA2DS64Float";
981 return "NVPTXISD::Tld4UnifiedR2DU64Float";
983 return "NVPTXISD::Tld4UnifiedG2DU64Float";
985 return "NVPTXISD::Tld4UnifiedB2DU64Float";
987 return "NVPTXISD::Tld4UnifiedA2DU64Float";
1184 bool Reciprocal)
const {
1186 (Enabled == ReciprocalEstimate::Unspecified && !
usePrecSqrtF32())))
1189 if (ExtraSteps == ReciprocalEstimate::Unspecified)
1205 if (Reciprocal || ExtraSteps > 0) {
1207 return MakeIntrinsicCall(Ftz ? Intrinsic::nvvm_rsqrt_approx_ftz_f
1208 : Intrinsic::nvvm_rsqrt_approx_f);
1210 return MakeIntrinsicCall(Intrinsic::nvvm_rsqrt_approx_d);
1215 return MakeIntrinsicCall(Ftz ? Intrinsic::nvvm_sqrt_approx_ftz_f
1216 : Intrinsic::nvvm_sqrt_approx_f);
1225 MakeIntrinsicCall(Intrinsic::nvvm_rsqrt_approx_d));
1246 assert(isABI &&
"Non-ABI compilation is not supported");
1250 std::stringstream
O;
1259 if (
auto *ITy = dyn_cast<IntegerType>(retTy)) {
1260 size = ITy->getBitWidth();
1263 "Floating point type expected here");
1272 O <<
".param .b" << size <<
" _";
1273 }
else if (isa<PointerType>(retTy)) {
1274 O <<
".param .b" << PtrVT.getSizeInBits() <<
" _";
1277 O <<
".param .align " << retAlignment <<
" .b8 _[" 1289 for (
unsigned i = 0, e = Args.size(); i != e; ++i, ++OIdx) {
1290 Type *Ty = Args[i].Ty;
1296 if (!Outs[OIdx].Flags.isByVal()) {
1301 if (!
getAlign(*CallI, i + 1, align))
1304 O <<
".param .align " << align <<
" .b8 ";
1306 O <<
"[" << sz <<
"]";
1310 if (
unsigned len = vtparts.
size())
1317 "type mismatch between callee prototype and arguments");
1320 if (isa<IntegerType>(Ty)) {
1324 }
else if (isa<PointerType>(Ty)) {
1325 sz = PtrVT.getSizeInBits();
1333 O <<
".param .b" << sz <<
" ";
1338 assert(PTy &&
"Param with byval attribute should be a pointer type");
1339 Type *ETy = PTy->getElementType();
1341 unsigned align = Outs[OIdx].Flags.getByValAlign();
1343 O <<
".param .align " << align <<
" .b8 ";
1345 O <<
"[" << sz <<
"]";
1351 unsigned NVPTXTargetLowering::getArgumentAlignment(
SDValue Callee,
1353 Type *Ty,
unsigned Idx,
1363 if (!DirectCallee) {
1367 assert(CalleeI &&
"Call target is not a function or derived value?");
1370 if (isa<CallInst>(CalleeI)) {
1372 if (
getAlign(*cast<CallInst>(CalleeI), Idx, Align))
1375 const Value *CalleeV = cast<CallInst>(CalleeI)->getCalledValue();
1377 while (isa<ConstantExpr>(CalleeV)) {
1382 CalleeV = cast<ConstantExpr>(CalleeV)->getOperand(0);
1387 if (isa<Function>(CalleeV))
1388 DirectCallee = CalleeV;
1395 if (
getAlign(*cast<Function>(DirectCallee), Idx, Align))
1419 assert(isABI &&
"Non-ABI compilation is not supported");
1427 unsigned paramCount = 0;
1440 for (
unsigned i = 0, e = Args.size(); i != e; ++i, ++OIdx) {
1441 EVT VT = Outs[OIdx].VT;
1442 Type *Ty = Args[i].Ty;
1444 if (!Outs[OIdx].Flags.isByVal()) {
1449 getArgumentAlignment(Callee, CS, Ty, paramCount + 1, DL);
1470 SDValue DeclareScalarParamOps[] = {
1475 DeclareScalarParamOps);
1484 bool ExtendIntegerParam =
1489 for (
unsigned j = 0, je = VTs.
size(); j != je; ++j) {
1492 assert(StoreOperands.
empty() &&
"Unfinished preceeding store.");
1499 SDValue StVal = OutVals[OIdx];
1500 if (ExtendIntegerParam) {
1501 assert(VTs.
size() == 1 &&
"Scalar can't have multiple parts.");
1516 unsigned NumElts = StoreOperands.
size() - 3;
1536 EVT TheStoreType = ExtendIntegerParam ?
MVT::i32 : VTs[j];
1547 StoreOperands.
clear();
1551 assert(StoreOperands.
empty() &&
"Unfinished parameter store.");
1562 assert(PTy &&
"Type of a byval parameter should be pointer");
1566 unsigned sz = Outs[OIdx].Flags.getByValSize();
1568 unsigned ArgAlign = Outs[OIdx].Flags.getByValAlign();
1584 for (
unsigned j = 0, je = VTs.
size(); j != je; ++j) {
1585 EVT elemtype = VTs[j];
1586 int curOffset = Offsets[j];
1597 SDValue CopyParamOps[] = { Chain,
1602 CopyParamOps, elemtype,
1612 unsigned retAlignment = 0;
1615 if (Ins.
size() > 0) {
1640 retAlignment = getArgumentAlignment(Callee, CS, RetTy, 0, DL);
1642 SDValue DeclareRetOps[] = { Chain,
1661 std::string Proto =
getPrototype(DL, RetTy, Args, Outs, retAlignment, CS);
1662 const char *ProtoStr =
1680 Chain = DAG.
getNode(Opcode, dl, PrintCallVTs, PrintCallOps);
1691 SDValue CallArgBeginOps[] = { Chain, InFlag };
1696 for (
unsigned i = 0, e = paramCount; i != e; ++i) {
1705 Chain = DAG.
getNode(opcode, dl, CallArgVTs, CallArgOps);
1709 SDValue CallArgEndOps[] = { Chain,
1717 SDValue PrototypeOps[] = { Chain,
1725 if (Ins.
size() > 0) {
1731 unsigned RetAlign = getArgumentAlignment(Callee, CS, RetTy, 0, DL);
1740 bool ExtendIntegerRetVal =
1743 for (
unsigned i = 0, e = VTs.
size(); i != e; ++i) {
1744 bool needTruncate =
false;
1745 EVT TheLoadType = VTs[i];
1746 EVT EltType = Ins[i].VT;
1748 if (ExtendIntegerRetVal) {
1751 needTruncate =
true;
1753 if (VTs[i].isInteger())
1754 needTruncate =
true;
1760 assert(VecIdx == -1 && LoadVTs.
empty() &&
"Orphaned operand list.");
1767 unsigned NumElts = LoadVTs.
size();
1789 Op, dl, DAG.
getVTList(LoadVTs), LoadOperands, TheLoadType,
1793 for (
unsigned j = 0; j < NumElts; ++j) {
1800 InFlag = RetVal.
getValue(NumElts + 1);
1831 for (
unsigned i = 0; i < NumOperands; ++i) {
1836 for (
unsigned j = 0; j < NumSubElem; ++j) {
1863 cast<ConstantFPSDNode>(Op->
getOperand(0))->getValueAPF().bitcastToAPInt();
1865 cast<ConstantFPSDNode>(Op->
getOperand(1))->getValueAPF().bitcastToAPInt();
1875 if (isa<ConstantSDNode>(Index.
getNode()))
2026 return LowerBUILD_VECTOR(Op, DAG);
2030 return LowerEXTRACT_VECTOR_ELT(Op, DAG);
2032 return LowerCONCAT_VECTORS(Op, DAG);
2034 return LowerSTORE(Op, DAG);
2036 return LowerLOAD(Op, DAG);
2038 return LowerShiftLeftParts(Op, DAG);
2041 return LowerShiftRightParts(Op, DAG);
2043 return LowerSelect(Op, DAG);
2067 return LowerLOADi1(Op, DAG);
2095 "Custom lowering for i1 load only");
2112 return LowerSTOREi1(Op, DAG);
2122 return LowerSTOREVector(Op, DAG);
2164 unsigned PrefAlign =
2166 if (Align < PrefAlign) {
2175 unsigned Opcode = 0;
2182 bool NeedExt =
false;
2186 bool StoreF16x2 =
false;
2214 for (
unsigned i = 0; i < NumElts; ++i) {
2224 for (
unsigned i = 0; i < NumElts; ++i) {
2267 NVPTXTargetLowering::getParamSymbol(
SelectionDAG &DAG,
int idx,
EVT v)
const {
2268 std::string ParamSym;
2274 std::string *SavedStr =
2282 static const char *
const specialTypes[] = {
"struct._image2d_t",
2283 "struct._image3d_t",
2284 "struct._sampler_t" };
2296 if (!STy || STy->isLiteral())
2300 STy->getName()) !=
std::end(specialTypes);
2316 std::vector<SDValue> OutChains;
2319 assert(isABI &&
"Non-ABI compilation is not supported");
2323 std::vector<Type *> argTypes;
2324 std::vector<const Argument *> theArgs;
2326 theArgs.push_back(&
I);
2327 argTypes.push_back(
I.getType());
2338 unsigned InsIdx = 0;
2341 for (
unsigned i = 0, e = theArgs.size(); i != e; ++i, ++idx, ++InsIdx) {
2342 Type *Ty = argTypes[i];
2352 "Only kernels can have image/sampler params");
2357 if (theArgs[i]->use_empty()) {
2363 assert(vtparts.
size() > 0 &&
"empty aggregate type not expected");
2364 for (
unsigned parti = 0, parte = vtparts.
size(); parti != parte;
2369 if (vtparts.
size() > 0)
2376 for (
unsigned parti = 0; parti < NumRegs; ++parti) {
2393 bool aggregateIsPacked =
false;
2394 if (
StructType *STy = dyn_cast<StructType>(Ty))
2395 aggregateIsPacked = STy->isPacked();
2400 assert(VTs.
size() > 0 &&
"Unexpected empty type.");
2404 SDValue Arg = getParamSymbol(DAG, idx, PtrVT);
2406 for (
unsigned parti = 0, parte = VTs.
size(); parti != parte; ++parti) {
2408 assert(VecIdx == -1 &&
"Orphaned vector.");
2413 if (VectorInfo[parti] &
PVF_LAST) {
2414 unsigned NumElts = parti - VecIdx + 1;
2415 EVT EltVT = VTs[parti];
2433 DAG.
getLoad(VecVT, dl, Root, VecAddr,
2439 for (
unsigned j = 0; j < NumElts; ++j) {
2450 if (Ins[InsIdx].VT.isInteger() &&
2454 Elt = DAG.
getNode(Extend, dl, Ins[InsIdx].VT, Elt);
2477 assert(ObjectVT == Ins[InsIdx].VT &&
2478 "Ins type did not match function type");
2479 SDValue Arg = getParamSymbol(DAG, idx, PtrVT);
2494 if (!OutChains.empty())
2510 assert(isABI &&
"Non-ABI compilation is not supported");
2518 assert(VTs.
size() == OutVals.
size() &&
"Bad return value decomposition");
2526 bool ExtendIntegerRetVal =
2530 for (
unsigned i = 0, e = VTs.
size(); i != e; ++i) {
2533 assert(StoreOperands.
empty() &&
"Orphaned operand list.");
2539 if (ExtendIntegerRetVal) {
2555 unsigned NumElts = StoreOperands.
size() - 2;
2572 EVT TheStoreType = ExtendIntegerRetVal ?
MVT::i32 : VTs[i];
2574 StoreOperands, TheStoreType,
2578 StoreOperands.
clear();
2586 SDValue Op, std::string &Constraint, std::vector<SDValue> &Ops,
2588 if (Constraint.length() > 1)
2595 switch (Intrinsic) {
2599 case Intrinsic::nvvm_tex_1d_v4f32_s32:
2601 case Intrinsic::nvvm_tex_1d_v4f32_f32:
2603 case Intrinsic::nvvm_tex_1d_level_v4f32_f32:
2605 case Intrinsic::nvvm_tex_1d_grad_v4f32_f32:
2607 case Intrinsic::nvvm_tex_1d_v4s32_s32:
2609 case Intrinsic::nvvm_tex_1d_v4s32_f32:
2611 case Intrinsic::nvvm_tex_1d_level_v4s32_f32:
2613 case Intrinsic::nvvm_tex_1d_grad_v4s32_f32:
2615 case Intrinsic::nvvm_tex_1d_v4u32_s32:
2617 case Intrinsic::nvvm_tex_1d_v4u32_f32:
2619 case Intrinsic::nvvm_tex_1d_level_v4u32_f32:
2621 case Intrinsic::nvvm_tex_1d_grad_v4u32_f32:
2624 case Intrinsic::nvvm_tex_1d_array_v4f32_s32:
2626 case Intrinsic::nvvm_tex_1d_array_v4f32_f32:
2628 case Intrinsic::nvvm_tex_1d_array_level_v4f32_f32:
2630 case Intrinsic::nvvm_tex_1d_array_grad_v4f32_f32:
2632 case Intrinsic::nvvm_tex_1d_array_v4s32_s32:
2634 case Intrinsic::nvvm_tex_1d_array_v4s32_f32:
2636 case Intrinsic::nvvm_tex_1d_array_level_v4s32_f32:
2638 case Intrinsic::nvvm_tex_1d_array_grad_v4s32_f32:
2640 case Intrinsic::nvvm_tex_1d_array_v4u32_s32:
2642 case Intrinsic::nvvm_tex_1d_array_v4u32_f32:
2644 case Intrinsic::nvvm_tex_1d_array_level_v4u32_f32:
2646 case Intrinsic::nvvm_tex_1d_array_grad_v4u32_f32:
2649 case Intrinsic::nvvm_tex_2d_v4f32_s32:
2651 case Intrinsic::nvvm_tex_2d_v4f32_f32:
2653 case Intrinsic::nvvm_tex_2d_level_v4f32_f32:
2655 case Intrinsic::nvvm_tex_2d_grad_v4f32_f32:
2657 case Intrinsic::nvvm_tex_2d_v4s32_s32:
2659 case Intrinsic::nvvm_tex_2d_v4s32_f32:
2661 case Intrinsic::nvvm_tex_2d_level_v4s32_f32:
2663 case Intrinsic::nvvm_tex_2d_grad_v4s32_f32:
2665 case Intrinsic::nvvm_tex_2d_v4u32_s32:
2667 case Intrinsic::nvvm_tex_2d_v4u32_f32:
2669 case Intrinsic::nvvm_tex_2d_level_v4u32_f32:
2671 case Intrinsic::nvvm_tex_2d_grad_v4u32_f32:
2674 case Intrinsic::nvvm_tex_2d_array_v4f32_s32:
2676 case Intrinsic::nvvm_tex_2d_array_v4f32_f32:
2678 case Intrinsic::nvvm_tex_2d_array_level_v4f32_f32:
2680 case Intrinsic::nvvm_tex_2d_array_grad_v4f32_f32:
2682 case Intrinsic::nvvm_tex_2d_array_v4s32_s32:
2684 case Intrinsic::nvvm_tex_2d_array_v4s32_f32:
2686 case Intrinsic::nvvm_tex_2d_array_level_v4s32_f32:
2688 case Intrinsic::nvvm_tex_2d_array_grad_v4s32_f32:
2690 case Intrinsic::nvvm_tex_2d_array_v4u32_s32:
2692 case Intrinsic::nvvm_tex_2d_array_v4u32_f32:
2694 case Intrinsic::nvvm_tex_2d_array_level_v4u32_f32:
2696 case Intrinsic::nvvm_tex_2d_array_grad_v4u32_f32:
2699 case Intrinsic::nvvm_tex_3d_v4f32_s32:
2701 case Intrinsic::nvvm_tex_3d_v4f32_f32:
2703 case Intrinsic::nvvm_tex_3d_level_v4f32_f32:
2705 case Intrinsic::nvvm_tex_3d_grad_v4f32_f32:
2707 case Intrinsic::nvvm_tex_3d_v4s32_s32:
2709 case Intrinsic::nvvm_tex_3d_v4s32_f32:
2711 case Intrinsic::nvvm_tex_3d_level_v4s32_f32:
2713 case Intrinsic::nvvm_tex_3d_grad_v4s32_f32:
2715 case Intrinsic::nvvm_tex_3d_v4u32_s32:
2717 case Intrinsic::nvvm_tex_3d_v4u32_f32:
2719 case Intrinsic::nvvm_tex_3d_level_v4u32_f32:
2721 case Intrinsic::nvvm_tex_3d_grad_v4u32_f32:
2724 case Intrinsic::nvvm_tex_cube_v4f32_f32:
2726 case Intrinsic::nvvm_tex_cube_level_v4f32_f32:
2728 case Intrinsic::nvvm_tex_cube_v4s32_f32:
2730 case Intrinsic::nvvm_tex_cube_level_v4s32_f32:
2732 case Intrinsic::nvvm_tex_cube_v4u32_f32:
2734 case Intrinsic::nvvm_tex_cube_level_v4u32_f32:
2737 case Intrinsic::nvvm_tex_cube_array_v4f32_f32:
2739 case Intrinsic::nvvm_tex_cube_array_level_v4f32_f32:
2741 case Intrinsic::nvvm_tex_cube_array_v4s32_f32:
2743 case Intrinsic::nvvm_tex_cube_array_level_v4s32_f32:
2745 case Intrinsic::nvvm_tex_cube_array_v4u32_f32:
2747 case Intrinsic::nvvm_tex_cube_array_level_v4u32_f32:
2750 case Intrinsic::nvvm_tld4_r_2d_v4f32_f32:
2752 case Intrinsic::nvvm_tld4_g_2d_v4f32_f32:
2754 case Intrinsic::nvvm_tld4_b_2d_v4f32_f32:
2756 case Intrinsic::nvvm_tld4_a_2d_v4f32_f32:
2758 case Intrinsic::nvvm_tld4_r_2d_v4s32_f32:
2760 case Intrinsic::nvvm_tld4_g_2d_v4s32_f32:
2762 case Intrinsic::nvvm_tld4_b_2d_v4s32_f32:
2764 case Intrinsic::nvvm_tld4_a_2d_v4s32_f32:
2766 case Intrinsic::nvvm_tld4_r_2d_v4u32_f32:
2768 case Intrinsic::nvvm_tld4_g_2d_v4u32_f32:
2770 case Intrinsic::nvvm_tld4_b_2d_v4u32_f32:
2772 case Intrinsic::nvvm_tld4_a_2d_v4u32_f32:
2775 case Intrinsic::nvvm_tex_unified_1d_v4f32_s32:
2777 case Intrinsic::nvvm_tex_unified_1d_v4f32_f32:
2779 case Intrinsic::nvvm_tex_unified_1d_level_v4f32_f32:
2781 case Intrinsic::nvvm_tex_unified_1d_grad_v4f32_f32:
2783 case Intrinsic::nvvm_tex_unified_1d_v4s32_s32:
2785 case Intrinsic::nvvm_tex_unified_1d_v4s32_f32:
2787 case Intrinsic::nvvm_tex_unified_1d_level_v4s32_f32:
2789 case Intrinsic::nvvm_tex_unified_1d_grad_v4s32_f32:
2791 case Intrinsic::nvvm_tex_unified_1d_v4u32_s32:
2793 case Intrinsic::nvvm_tex_unified_1d_v4u32_f32:
2795 case Intrinsic::nvvm_tex_unified_1d_level_v4u32_f32:
2797 case Intrinsic::nvvm_tex_unified_1d_grad_v4u32_f32:
2800 case Intrinsic::nvvm_tex_unified_1d_array_v4f32_s32:
2802 case Intrinsic::nvvm_tex_unified_1d_array_v4f32_f32:
2804 case Intrinsic::nvvm_tex_unified_1d_array_level_v4f32_f32:
2806 case Intrinsic::nvvm_tex_unified_1d_array_grad_v4f32_f32:
2808 case Intrinsic::nvvm_tex_unified_1d_array_v4s32_s32:
2810 case Intrinsic::nvvm_tex_unified_1d_array_v4s32_f32:
2812 case Intrinsic::nvvm_tex_unified_1d_array_level_v4s32_f32:
2814 case Intrinsic::nvvm_tex_unified_1d_array_grad_v4s32_f32:
2816 case Intrinsic::nvvm_tex_unified_1d_array_v4u32_s32:
2818 case Intrinsic::nvvm_tex_unified_1d_array_v4u32_f32:
2820 case Intrinsic::nvvm_tex_unified_1d_array_level_v4u32_f32:
2822 case Intrinsic::nvvm_tex_unified_1d_array_grad_v4u32_f32:
2825 case Intrinsic::nvvm_tex_unified_2d_v4f32_s32:
2827 case Intrinsic::nvvm_tex_unified_2d_v4f32_f32:
2829 case Intrinsic::nvvm_tex_unified_2d_level_v4f32_f32:
2831 case Intrinsic::nvvm_tex_unified_2d_grad_v4f32_f32:
2833 case Intrinsic::nvvm_tex_unified_2d_v4s32_s32:
2835 case Intrinsic::nvvm_tex_unified_2d_v4s32_f32:
2837 case Intrinsic::nvvm_tex_unified_2d_level_v4s32_f32:
2839 case Intrinsic::nvvm_tex_unified_2d_grad_v4s32_f32:
2841 case Intrinsic::nvvm_tex_unified_2d_v4u32_s32:
2843 case Intrinsic::nvvm_tex_unified_2d_v4u32_f32:
2845 case Intrinsic::nvvm_tex_unified_2d_level_v4u32_f32:
2847 case Intrinsic::nvvm_tex_unified_2d_grad_v4u32_f32:
2850 case Intrinsic::nvvm_tex_unified_2d_array_v4f32_s32:
2852 case Intrinsic::nvvm_tex_unified_2d_array_v4f32_f32:
2854 case Intrinsic::nvvm_tex_unified_2d_array_level_v4f32_f32:
2856 case Intrinsic::nvvm_tex_unified_2d_array_grad_v4f32_f32:
2858 case Intrinsic::nvvm_tex_unified_2d_array_v4s32_s32:
2860 case Intrinsic::nvvm_tex_unified_2d_array_v4s32_f32:
2862 case Intrinsic::nvvm_tex_unified_2d_array_level_v4s32_f32:
2864 case Intrinsic::nvvm_tex_unified_2d_array_grad_v4s32_f32:
2866 case Intrinsic::nvvm_tex_unified_2d_array_v4u32_s32:
2868 case Intrinsic::nvvm_tex_unified_2d_array_v4u32_f32:
2870 case Intrinsic::nvvm_tex_unified_2d_array_level_v4u32_f32:
2872 case Intrinsic::nvvm_tex_unified_2d_array_grad_v4u32_f32:
2875 case Intrinsic::nvvm_tex_unified_3d_v4f32_s32:
2877 case Intrinsic::nvvm_tex_unified_3d_v4f32_f32:
2879 case Intrinsic::nvvm_tex_unified_3d_level_v4f32_f32:
2881 case Intrinsic::nvvm_tex_unified_3d_grad_v4f32_f32:
2883 case Intrinsic::nvvm_tex_unified_3d_v4s32_s32:
2885 case Intrinsic::nvvm_tex_unified_3d_v4s32_f32:
2887 case Intrinsic::nvvm_tex_unified_3d_level_v4s32_f32:
2889 case Intrinsic::nvvm_tex_unified_3d_grad_v4s32_f32:
2891 case Intrinsic::nvvm_tex_unified_3d_v4u32_s32:
2893 case Intrinsic::nvvm_tex_unified_3d_v4u32_f32:
2895 case Intrinsic::nvvm_tex_unified_3d_level_v4u32_f32:
2897 case Intrinsic::nvvm_tex_unified_3d_grad_v4u32_f32:
2900 case Intrinsic::nvvm_tex_unified_cube_v4f32_f32:
2902 case Intrinsic::nvvm_tex_unified_cube_level_v4f32_f32:
2904 case Intrinsic::nvvm_tex_unified_cube_v4s32_f32:
2906 case Intrinsic::nvvm_tex_unified_cube_level_v4s32_f32:
2908 case Intrinsic::nvvm_tex_unified_cube_v4u32_f32:
2910 case Intrinsic::nvvm_tex_unified_cube_level_v4u32_f32:
2913 case Intrinsic::nvvm_tex_unified_cube_array_v4f32_f32:
2915 case Intrinsic::nvvm_tex_unified_cube_array_level_v4f32_f32:
2917 case Intrinsic::nvvm_tex_unified_cube_array_v4s32_f32:
2919 case Intrinsic::nvvm_tex_unified_cube_array_level_v4s32_f32:
2921 case Intrinsic::nvvm_tex_unified_cube_array_v4u32_f32:
2923 case Intrinsic::nvvm_tex_unified_cube_array_level_v4u32_f32:
2926 case Intrinsic::nvvm_tld4_unified_r_2d_v4f32_f32:
2928 case Intrinsic::nvvm_tld4_unified_g_2d_v4f32_f32:
2930 case Intrinsic::nvvm_tld4_unified_b_2d_v4f32_f32:
2932 case Intrinsic::nvvm_tld4_unified_a_2d_v4f32_f32:
2934 case Intrinsic::nvvm_tld4_unified_r_2d_v4s32_f32:
2936 case Intrinsic::nvvm_tld4_unified_g_2d_v4s32_f32:
2938 case Intrinsic::nvvm_tld4_unified_b_2d_v4s32_f32:
2940 case Intrinsic::nvvm_tld4_unified_a_2d_v4s32_f32:
2942 case Intrinsic::nvvm_tld4_unified_r_2d_v4u32_f32:
2944 case Intrinsic::nvvm_tld4_unified_g_2d_v4u32_f32:
2946 case Intrinsic::nvvm_tld4_unified_b_2d_v4u32_f32:
2948 case Intrinsic::nvvm_tld4_unified_a_2d_v4u32_f32:
2954 switch (Intrinsic) {
2957 case Intrinsic::nvvm_suld_1d_i8_clamp:
2959 case Intrinsic::nvvm_suld_1d_i16_clamp:
2961 case Intrinsic::nvvm_suld_1d_i32_clamp:
2963 case Intrinsic::nvvm_suld_1d_i64_clamp:
2965 case Intrinsic::nvvm_suld_1d_v2i8_clamp:
2967 case Intrinsic::nvvm_suld_1d_v2i16_clamp:
2969 case Intrinsic::nvvm_suld_1d_v2i32_clamp:
2971 case Intrinsic::nvvm_suld_1d_v2i64_clamp:
2973 case Intrinsic::nvvm_suld_1d_v4i8_clamp:
2975 case Intrinsic::nvvm_suld_1d_v4i16_clamp:
2977 case Intrinsic::nvvm_suld_1d_v4i32_clamp:
2979 case Intrinsic::nvvm_suld_1d_array_i8_clamp:
2981 case Intrinsic::nvvm_suld_1d_array_i16_clamp:
2983 case Intrinsic::nvvm_suld_1d_array_i32_clamp:
2985 case Intrinsic::nvvm_suld_1d_array_i64_clamp:
2987 case Intrinsic::nvvm_suld_1d_array_v2i8_clamp:
2989 case Intrinsic::nvvm_suld_1d_array_v2i16_clamp:
2991 case Intrinsic::nvvm_suld_1d_array_v2i32_clamp:
2993 case Intrinsic::nvvm_suld_1d_array_v2i64_clamp:
2995 case Intrinsic::nvvm_suld_1d_array_v4i8_clamp:
2997 case Intrinsic::nvvm_suld_1d_array_v4i16_clamp:
2999 case Intrinsic::nvvm_suld_1d_array_v4i32_clamp:
3001 case Intrinsic::nvvm_suld_2d_i8_clamp:
3003 case Intrinsic::nvvm_suld_2d_i16_clamp:
3005 case Intrinsic::nvvm_suld_2d_i32_clamp:
3007 case Intrinsic::nvvm_suld_2d_i64_clamp:
3009 case Intrinsic::nvvm_suld_2d_v2i8_clamp:
3011 case Intrinsic::nvvm_suld_2d_v2i16_clamp:
3013 case Intrinsic::nvvm_suld_2d_v2i32_clamp:
3015 case Intrinsic::nvvm_suld_2d_v2i64_clamp:
3017 case Intrinsic::nvvm_suld_2d_v4i8_clamp:
3019 case Intrinsic::nvvm_suld_2d_v4i16_clamp:
3021 case Intrinsic::nvvm_suld_2d_v4i32_clamp:
3023 case Intrinsic::nvvm_suld_2d_array_i8_clamp:
3025 case Intrinsic::nvvm_suld_2d_array_i16_clamp:
3027 case Intrinsic::nvvm_suld_2d_array_i32_clamp:
3029 case Intrinsic::nvvm_suld_2d_array_i64_clamp:
3031 case Intrinsic::nvvm_suld_2d_array_v2i8_clamp:
3033 case Intrinsic::nvvm_suld_2d_array_v2i16_clamp:
3035 case Intrinsic::nvvm_suld_2d_array_v2i32_clamp:
3037 case Intrinsic::nvvm_suld_2d_array_v2i64_clamp:
3039 case Intrinsic::nvvm_suld_2d_array_v4i8_clamp:
3041 case Intrinsic::nvvm_suld_2d_array_v4i16_clamp:
3043 case Intrinsic::nvvm_suld_2d_array_v4i32_clamp:
3045 case Intrinsic::nvvm_suld_3d_i8_clamp:
3047 case Intrinsic::nvvm_suld_3d_i16_clamp:
3049 case Intrinsic::nvvm_suld_3d_i32_clamp:
3051 case Intrinsic::nvvm_suld_3d_i64_clamp:
3053 case Intrinsic::nvvm_suld_3d_v2i8_clamp:
3055 case Intrinsic::nvvm_suld_3d_v2i16_clamp:
3057 case Intrinsic::nvvm_suld_3d_v2i32_clamp:
3059 case Intrinsic::nvvm_suld_3d_v2i64_clamp:
3061 case Intrinsic::nvvm_suld_3d_v4i8_clamp:
3063 case Intrinsic::nvvm_suld_3d_v4i16_clamp:
3065 case Intrinsic::nvvm_suld_3d_v4i32_clamp:
3067 case Intrinsic::nvvm_suld_1d_i8_trap:
3069 case Intrinsic::nvvm_suld_1d_i16_trap:
3071 case Intrinsic::nvvm_suld_1d_i32_trap:
3073 case Intrinsic::nvvm_suld_1d_i64_trap:
3075 case Intrinsic::nvvm_suld_1d_v2i8_trap:
3077 case Intrinsic::nvvm_suld_1d_v2i16_trap:
3079 case Intrinsic::nvvm_suld_1d_v2i32_trap:
3081 case Intrinsic::nvvm_suld_1d_v2i64_trap:
3083 case Intrinsic::nvvm_suld_1d_v4i8_trap:
3085 case Intrinsic::nvvm_suld_1d_v4i16_trap:
3087 case Intrinsic::nvvm_suld_1d_v4i32_trap:
3089 case Intrinsic::nvvm_suld_1d_array_i8_trap:
3091 case Intrinsic::nvvm_suld_1d_array_i16_trap:
3093 case Intrinsic::nvvm_suld_1d_array_i32_trap:
3095 case Intrinsic::nvvm_suld_1d_array_i64_trap:
3097 case Intrinsic::nvvm_suld_1d_array_v2i8_trap:
3099 case Intrinsic::nvvm_suld_1d_array_v2i16_trap:
3101 case Intrinsic::nvvm_suld_1d_array_v2i32_trap:
3103 case Intrinsic::nvvm_suld_1d_array_v2i64_trap:
3105 case Intrinsic::nvvm_suld_1d_array_v4i8_trap:
3107 case Intrinsic::nvvm_suld_1d_array_v4i16_trap:
3109 case Intrinsic::nvvm_suld_1d_array_v4i32_trap:
3111 case Intrinsic::nvvm_suld_2d_i8_trap:
3113 case Intrinsic::nvvm_suld_2d_i16_trap:
3115 case Intrinsic::nvvm_suld_2d_i32_trap:
3117 case Intrinsic::nvvm_suld_2d_i64_trap:
3119 case Intrinsic::nvvm_suld_2d_v2i8_trap:
3121 case Intrinsic::nvvm_suld_2d_v2i16_trap:
3123 case Intrinsic::nvvm_suld_2d_v2i32_trap:
3125 case Intrinsic::nvvm_suld_2d_v2i64_trap:
3127 case Intrinsic::nvvm_suld_2d_v4i8_trap:
3129 case Intrinsic::nvvm_suld_2d_v4i16_trap:
3131 case Intrinsic::nvvm_suld_2d_v4i32_trap:
3133 case Intrinsic::nvvm_suld_2d_array_i8_trap:
3135 case Intrinsic::nvvm_suld_2d_array_i16_trap:
3137 case Intrinsic::nvvm_suld_2d_array_i32_trap:
3139 case Intrinsic::nvvm_suld_2d_array_i64_trap:
3141 case Intrinsic::nvvm_suld_2d_array_v2i8_trap:
3143 case Intrinsic::nvvm_suld_2d_array_v2i16_trap:
3145 case Intrinsic::nvvm_suld_2d_array_v2i32_trap:
3147 case Intrinsic::nvvm_suld_2d_array_v2i64_trap:
3149 case Intrinsic::nvvm_suld_2d_array_v4i8_trap:
3151 case Intrinsic::nvvm_suld_2d_array_v4i16_trap:
3153 case Intrinsic::nvvm_suld_2d_array_v4i32_trap:
3155 case Intrinsic::nvvm_suld_3d_i8_trap:
3157 case Intrinsic::nvvm_suld_3d_i16_trap:
3159 case Intrinsic::nvvm_suld_3d_i32_trap:
3161 case Intrinsic::nvvm_suld_3d_i64_trap:
3163 case Intrinsic::nvvm_suld_3d_v2i8_trap:
3165 case Intrinsic::nvvm_suld_3d_v2i16_trap:
3167 case Intrinsic::nvvm_suld_3d_v2i32_trap:
3169 case Intrinsic::nvvm_suld_3d_v2i64_trap:
3171 case Intrinsic::nvvm_suld_3d_v4i8_trap:
3173 case Intrinsic::nvvm_suld_3d_v4i16_trap:
3175 case Intrinsic::nvvm_suld_3d_v4i32_trap:
3177 case Intrinsic::nvvm_suld_1d_i8_zero:
3179 case Intrinsic::nvvm_suld_1d_i16_zero:
3181 case Intrinsic::nvvm_suld_1d_i32_zero:
3183 case Intrinsic::nvvm_suld_1d_i64_zero:
3185 case Intrinsic::nvvm_suld_1d_v2i8_zero:
3187 case Intrinsic::nvvm_suld_1d_v2i16_zero:
3189 case Intrinsic::nvvm_suld_1d_v2i32_zero:
3191 case Intrinsic::nvvm_suld_1d_v2i64_zero:
3193 case Intrinsic::nvvm_suld_1d_v4i8_zero:
3195 case Intrinsic::nvvm_suld_1d_v4i16_zero:
3197 case Intrinsic::nvvm_suld_1d_v4i32_zero:
3199 case Intrinsic::nvvm_suld_1d_array_i8_zero:
3201 case Intrinsic::nvvm_suld_1d_array_i16_zero:
3203 case Intrinsic::nvvm_suld_1d_array_i32_zero:
3205 case Intrinsic::nvvm_suld_1d_array_i64_zero:
3207 case Intrinsic::nvvm_suld_1d_array_v2i8_zero:
3209 case Intrinsic::nvvm_suld_1d_array_v2i16_zero:
3211 case Intrinsic::nvvm_suld_1d_array_v2i32_zero:
3213 case Intrinsic::nvvm_suld_1d_array_v2i64_zero:
3215 case Intrinsic::nvvm_suld_1d_array_v4i8_zero:
3217 case Intrinsic::nvvm_suld_1d_array_v4i16_zero:
3219 case Intrinsic::nvvm_suld_1d_array_v4i32_zero:
3221 case Intrinsic::nvvm_suld_2d_i8_zero:
3223 case Intrinsic::nvvm_suld_2d_i16_zero:
3225 case Intrinsic::nvvm_suld_2d_i32_zero:
3227 case Intrinsic::nvvm_suld_2d_i64_zero:
3229 case Intrinsic::nvvm_suld_2d_v2i8_zero:
3231 case Intrinsic::nvvm_suld_2d_v2i16_zero:
3233 case Intrinsic::nvvm_suld_2d_v2i32_zero:
3235 case Intrinsic::nvvm_suld_2d_v2i64_zero:
3237 case Intrinsic::nvvm_suld_2d_v4i8_zero:
3239 case Intrinsic::nvvm_suld_2d_v4i16_zero:
3241 case Intrinsic::nvvm_suld_2d_v4i32_zero:
3243 case Intrinsic::nvvm_suld_2d_array_i8_zero:
3245 case Intrinsic::nvvm_suld_2d_array_i16_zero:
3247 case Intrinsic::nvvm_suld_2d_array_i32_zero:
3249 case Intrinsic::nvvm_suld_2d_array_i64_zero:
3251 case Intrinsic::nvvm_suld_2d_array_v2i8_zero:
3253 case Intrinsic::nvvm_suld_2d_array_v2i16_zero:
3255 case Intrinsic::nvvm_suld_2d_array_v2i32_zero:
3257 case Intrinsic::nvvm_suld_2d_array_v2i64_zero:
3259 case Intrinsic::nvvm_suld_2d_array_v4i8_zero:
3261 case Intrinsic::nvvm_suld_2d_array_v4i16_zero:
3263 case Intrinsic::nvvm_suld_2d_array_v4i32_zero:
3265 case Intrinsic::nvvm_suld_3d_i8_zero:
3267 case Intrinsic::nvvm_suld_3d_i16_zero:
3269 case Intrinsic::nvvm_suld_3d_i32_zero:
3271 case Intrinsic::nvvm_suld_3d_i64_zero:
3273 case Intrinsic::nvvm_suld_3d_v2i8_zero:
3275 case Intrinsic::nvvm_suld_3d_v2i16_zero:
3277 case Intrinsic::nvvm_suld_3d_v2i32_zero:
3279 case Intrinsic::nvvm_suld_3d_v2i64_zero:
3281 case Intrinsic::nvvm_suld_3d_v4i8_zero:
3283 case Intrinsic::nvvm_suld_3d_v4i16_zero:
3285 case Intrinsic::nvvm_suld_3d_v4i32_zero:
3298 switch (Intrinsic) {
3301 case Intrinsic::nvvm_match_all_sync_i32p:
3302 case Intrinsic::nvvm_match_all_sync_i64p:
3312 case Intrinsic::nvvm_wmma_m16n16k16_load_a_f16_col:
3313 case Intrinsic::nvvm_wmma_m16n16k16_load_a_f16_row:
3314 case Intrinsic::nvvm_wmma_m16n16k16_load_a_f16_col_stride:
3315 case Intrinsic::nvvm_wmma_m16n16k16_load_a_f16_row_stride:
3316 case Intrinsic::nvvm_wmma_m16n16k16_load_b_f16_col:
3317 case Intrinsic::nvvm_wmma_m16n16k16_load_b_f16_row:
3318 case Intrinsic::nvvm_wmma_m16n16k16_load_b_f16_col_stride:
3319 case Intrinsic::nvvm_wmma_m16n16k16_load_b_f16_row_stride:
3320 case Intrinsic::nvvm_wmma_m32n8k16_load_a_f16_col:
3321 case Intrinsic::nvvm_wmma_m32n8k16_load_a_f16_row:
3322 case Intrinsic::nvvm_wmma_m32n8k16_load_a_f16_col_stride:
3323 case Intrinsic::nvvm_wmma_m32n8k16_load_a_f16_row_stride:
3324 case Intrinsic::nvvm_wmma_m32n8k16_load_b_f16_col:
3325 case Intrinsic::nvvm_wmma_m32n8k16_load_b_f16_row:
3326 case Intrinsic::nvvm_wmma_m32n8k16_load_b_f16_col_stride:
3327 case Intrinsic::nvvm_wmma_m32n8k16_load_b_f16_row_stride:
3328 case Intrinsic::nvvm_wmma_m8n32k16_load_a_f16_col:
3329 case Intrinsic::nvvm_wmma_m8n32k16_load_a_f16_row:
3330 case Intrinsic::nvvm_wmma_m8n32k16_load_a_f16_col_stride:
3331 case Intrinsic::nvvm_wmma_m8n32k16_load_a_f16_row_stride:
3332 case Intrinsic::nvvm_wmma_m8n32k16_load_b_f16_col:
3333 case Intrinsic::nvvm_wmma_m8n32k16_load_b_f16_row:
3334 case Intrinsic::nvvm_wmma_m8n32k16_load_b_f16_col_stride:
3335 case Intrinsic::nvvm_wmma_m8n32k16_load_b_f16_row_stride: {
3345 case Intrinsic::nvvm_wmma_m16n16k16_load_c_f16_col:
3346 case Intrinsic::nvvm_wmma_m16n16k16_load_c_f16_row:
3347 case Intrinsic::nvvm_wmma_m16n16k16_load_c_f16_col_stride:
3348 case Intrinsic::nvvm_wmma_m16n16k16_load_c_f16_row_stride:
3349 case Intrinsic::nvvm_wmma_m32n8k16_load_c_f16_col:
3350 case Intrinsic::nvvm_wmma_m32n8k16_load_c_f16_row:
3351 case Intrinsic::nvvm_wmma_m32n8k16_load_c_f16_col_stride:
3352 case Intrinsic::nvvm_wmma_m32n8k16_load_c_f16_row_stride:
3353 case Intrinsic::nvvm_wmma_m8n32k16_load_c_f16_col:
3354 case Intrinsic::nvvm_wmma_m8n32k16_load_c_f16_row:
3355 case Intrinsic::nvvm_wmma_m8n32k16_load_c_f16_col_stride:
3356 case Intrinsic::nvvm_wmma_m8n32k16_load_c_f16_row_stride: {
3366 case Intrinsic::nvvm_wmma_m16n16k16_load_c_f32_col:
3367 case Intrinsic::nvvm_wmma_m16n16k16_load_c_f32_row:
3368 case Intrinsic::nvvm_wmma_m16n16k16_load_c_f32_col_stride:
3369 case Intrinsic::nvvm_wmma_m16n16k16_load_c_f32_row_stride:
3370 case Intrinsic::nvvm_wmma_m32n8k16_load_c_f32_col:
3371 case Intrinsic::nvvm_wmma_m32n8k16_load_c_f32_row:
3372 case Intrinsic::nvvm_wmma_m32n8k16_load_c_f32_col_stride:
3373 case Intrinsic::nvvm_wmma_m32n8k16_load_c_f32_row_stride:
3374 case Intrinsic::nvvm_wmma_m8n32k16_load_c_f32_col:
3375 case Intrinsic::nvvm_wmma_m8n32k16_load_c_f32_row:
3376 case Intrinsic::nvvm_wmma_m8n32k16_load_c_f32_col_stride:
3377 case Intrinsic::nvvm_wmma_m8n32k16_load_c_f32_row_stride: {
3387 case Intrinsic::nvvm_wmma_m16n16k16_store_d_f16_col:
3388 case Intrinsic::nvvm_wmma_m16n16k16_store_d_f16_row:
3389 case Intrinsic::nvvm_wmma_m16n16k16_store_d_f16_col_stride:
3390 case Intrinsic::nvvm_wmma_m16n16k16_store_d_f16_row_stride:
3391 case Intrinsic::nvvm_wmma_m32n8k16_store_d_f16_col:
3392 case Intrinsic::nvvm_wmma_m32n8k16_store_d_f16_row:
3393 case Intrinsic::nvvm_wmma_m32n8k16_store_d_f16_col_stride:
3394 case Intrinsic::nvvm_wmma_m32n8k16_store_d_f16_row_stride:
3395 case Intrinsic::nvvm_wmma_m8n32k16_store_d_f16_col:
3396 case Intrinsic::nvvm_wmma_m8n32k16_store_d_f16_row:
3397 case Intrinsic::nvvm_wmma_m8n32k16_store_d_f16_col_stride:
3398 case Intrinsic::nvvm_wmma_m8n32k16_store_d_f16_row_stride: {
3408 case Intrinsic::nvvm_wmma_m16n16k16_store_d_f32_col:
3409 case Intrinsic::nvvm_wmma_m16n16k16_store_d_f32_row:
3410 case Intrinsic::nvvm_wmma_m16n16k16_store_d_f32_col_stride:
3411 case Intrinsic::nvvm_wmma_m16n16k16_store_d_f32_row_stride:
3412 case Intrinsic::nvvm_wmma_m32n8k16_store_d_f32_col:
3413 case Intrinsic::nvvm_wmma_m32n8k16_store_d_f32_row:
3414 case Intrinsic::nvvm_wmma_m32n8k16_store_d_f32_col_stride:
3415 case Intrinsic::nvvm_wmma_m32n8k16_store_d_f32_row_stride:
3416 case Intrinsic::nvvm_wmma_m8n32k16_store_d_f32_col:
3417 case Intrinsic::nvvm_wmma_m8n32k16_store_d_f32_row:
3418 case Intrinsic::nvvm_wmma_m8n32k16_store_d_f32_col_stride:
3419 case Intrinsic::nvvm_wmma_m8n32k16_store_d_f32_row_stride: {
3429 case Intrinsic::nvvm_atomic_load_add_f32:
3430 case Intrinsic::nvvm_atomic_load_add_f64:
3431 case Intrinsic::nvvm_atomic_load_inc_32:
3432 case Intrinsic::nvvm_atomic_load_dec_32:
3434 case Intrinsic::nvvm_atomic_add_gen_f_cta:
3435 case Intrinsic::nvvm_atomic_add_gen_f_sys:
3436 case Intrinsic::nvvm_atomic_add_gen_i_cta:
3437 case Intrinsic::nvvm_atomic_add_gen_i_sys:
3438 case Intrinsic::nvvm_atomic_and_gen_i_cta:
3439 case Intrinsic::nvvm_atomic_and_gen_i_sys:
3440 case Intrinsic::nvvm_atomic_cas_gen_i_cta:
3441 case Intrinsic::nvvm_atomic_cas_gen_i_sys:
3442 case Intrinsic::nvvm_atomic_dec_gen_i_cta:
3443 case Intrinsic::nvvm_atomic_dec_gen_i_sys:
3444 case Intrinsic::nvvm_atomic_inc_gen_i_cta:
3445 case Intrinsic::nvvm_atomic_inc_gen_i_sys:
3446 case Intrinsic::nvvm_atomic_max_gen_i_cta:
3447 case Intrinsic::nvvm_atomic_max_gen_i_sys:
3448 case Intrinsic::nvvm_atomic_min_gen_i_cta:
3449 case Intrinsic::nvvm_atomic_min_gen_i_sys:
3450 case Intrinsic::nvvm_atomic_or_gen_i_cta:
3451 case Intrinsic::nvvm_atomic_or_gen_i_sys:
3452 case Intrinsic::nvvm_atomic_exch_gen_i_cta:
3453 case Intrinsic::nvvm_atomic_exch_gen_i_sys:
3454 case Intrinsic::nvvm_atomic_xor_gen_i_cta:
3455 case Intrinsic::nvvm_atomic_xor_gen_i_sys: {
3466 case Intrinsic::nvvm_ldu_global_i:
3467 case Intrinsic::nvvm_ldu_global_f:
3468 case Intrinsic::nvvm_ldu_global_p: {
3471 if (Intrinsic == Intrinsic::nvvm_ldu_global_i)
3473 else if(Intrinsic == Intrinsic::nvvm_ldu_global_p)
3484 case Intrinsic::nvvm_ldg_global_i:
3485 case Intrinsic::nvvm_ldg_global_f:
3486 case Intrinsic::nvvm_ldg_global_p: {
3490 if (Intrinsic == Intrinsic::nvvm_ldg_global_i)
3492 else if(Intrinsic == Intrinsic::nvvm_ldg_global_p)
3504 case Intrinsic::nvvm_tex_1d_v4f32_s32:
3505 case Intrinsic::nvvm_tex_1d_v4f32_f32:
3506 case Intrinsic::nvvm_tex_1d_level_v4f32_f32:
3507 case Intrinsic::nvvm_tex_1d_grad_v4f32_f32:
3508 case Intrinsic::nvvm_tex_1d_array_v4f32_s32:
3509 case Intrinsic::nvvm_tex_1d_array_v4f32_f32:
3510 case Intrinsic::nvvm_tex_1d_array_level_v4f32_f32:
3511 case Intrinsic::nvvm_tex_1d_array_grad_v4f32_f32:
3512 case Intrinsic::nvvm_tex_2d_v4f32_s32:
3513 case Intrinsic::nvvm_tex_2d_v4f32_f32:
3514 case Intrinsic::nvvm_tex_2d_level_v4f32_f32:
3515 case Intrinsic::nvvm_tex_2d_grad_v4f32_f32:
3516 case Intrinsic::nvvm_tex_2d_array_v4f32_s32:
3517 case Intrinsic::nvvm_tex_2d_array_v4f32_f32:
3518 case Intrinsic::nvvm_tex_2d_array_level_v4f32_f32:
3519 case Intrinsic::nvvm_tex_2d_array_grad_v4f32_f32:
3520 case Intrinsic::nvvm_tex_3d_v4f32_s32:
3521 case Intrinsic::nvvm_tex_3d_v4f32_f32:
3522 case Intrinsic::nvvm_tex_3d_level_v4f32_f32:
3523 case Intrinsic::nvvm_tex_3d_grad_v4f32_f32:
3524 case Intrinsic::nvvm_tex_cube_v4f32_f32:
3525 case Intrinsic::nvvm_tex_cube_level_v4f32_f32:
3526 case Intrinsic::nvvm_tex_cube_array_v4f32_f32:
3527 case Intrinsic::nvvm_tex_cube_array_level_v4f32_f32:
3528 case Intrinsic::nvvm_tld4_r_2d_v4f32_f32:
3529 case Intrinsic::nvvm_tld4_g_2d_v4f32_f32:
3530 case Intrinsic::nvvm_tld4_b_2d_v4f32_f32:
3531 case Intrinsic::nvvm_tld4_a_2d_v4f32_f32:
3532 case Intrinsic::nvvm_tex_unified_1d_v4f32_s32:
3533 case Intrinsic::nvvm_tex_unified_1d_v4f32_f32:
3534 case Intrinsic::nvvm_tex_unified_1d_level_v4f32_f32:
3535 case Intrinsic::nvvm_tex_unified_1d_grad_v4f32_f32:
3536 case Intrinsic::nvvm_tex_unified_1d_array_v4f32_s32:
3537 case Intrinsic::nvvm_tex_unified_1d_array_v4f32_f32:
3538 case Intrinsic::nvvm_tex_unified_1d_array_level_v4f32_f32:
3539 case Intrinsic::nvvm_tex_unified_1d_array_grad_v4f32_f32:
3540 case Intrinsic::nvvm_tex_unified_2d_v4f32_s32:
3541 case Intrinsic::nvvm_tex_unified_2d_v4f32_f32:
3542 case Intrinsic::nvvm_tex_unified_2d_level_v4f32_f32:
3543 case Intrinsic::nvvm_tex_unified_2d_grad_v4f32_f32:
3544 case Intrinsic::nvvm_tex_unified_2d_array_v4f32_s32:
3545 case Intrinsic::nvvm_tex_unified_2d_array_v4f32_f32:
3546 case Intrinsic::nvvm_tex_unified_2d_array_level_v4f32_f32:
3547 case Intrinsic::nvvm_tex_unified_2d_array_grad_v4f32_f32:
3548 case Intrinsic::nvvm_tex_unified_3d_v4f32_s32:
3549 case Intrinsic::nvvm_tex_unified_3d_v4f32_f32:
3550 case Intrinsic::nvvm_tex_unified_3d_level_v4f32_f32:
3551 case Intrinsic::nvvm_tex_unified_3d_grad_v4f32_f32:
3552 case Intrinsic::nvvm_tex_unified_cube_v4f32_f32:
3553 case Intrinsic::nvvm_tex_unified_cube_level_v4f32_f32:
3554 case Intrinsic::nvvm_tex_unified_cube_array_v4f32_f32:
3555 case Intrinsic::nvvm_tex_unified_cube_array_level_v4f32_f32:
3556 case Intrinsic::nvvm_tld4_unified_r_2d_v4f32_f32:
3557 case Intrinsic::nvvm_tld4_unified_g_2d_v4f32_f32:
3558 case Intrinsic::nvvm_tld4_unified_b_2d_v4f32_f32:
3559 case Intrinsic::nvvm_tld4_unified_a_2d_v4f32_f32:
3568 case Intrinsic::nvvm_tex_1d_v4s32_s32:
3569 case Intrinsic::nvvm_tex_1d_v4s32_f32:
3570 case Intrinsic::nvvm_tex_1d_level_v4s32_f32:
3571 case Intrinsic::nvvm_tex_1d_grad_v4s32_f32:
3572 case Intrinsic::nvvm_tex_1d_array_v4s32_s32:
3573 case Intrinsic::nvvm_tex_1d_array_v4s32_f32:
3574 case Intrinsic::nvvm_tex_1d_array_level_v4s32_f32:
3575 case Intrinsic::nvvm_tex_1d_array_grad_v4s32_f32:
3576 case Intrinsic::nvvm_tex_2d_v4s32_s32:
3577 case Intrinsic::nvvm_tex_2d_v4s32_f32:
3578 case Intrinsic::nvvm_tex_2d_level_v4s32_f32:
3579 case Intrinsic::nvvm_tex_2d_grad_v4s32_f32:
3580 case Intrinsic::nvvm_tex_2d_array_v4s32_s32:
3581 case Intrinsic::nvvm_tex_2d_array_v4s32_f32:
3582 case Intrinsic::nvvm_tex_2d_array_level_v4s32_f32:
3583 case Intrinsic::nvvm_tex_2d_array_grad_v4s32_f32:
3584 case Intrinsic::nvvm_tex_3d_v4s32_s32:
3585 case Intrinsic::nvvm_tex_3d_v4s32_f32:
3586 case Intrinsic::nvvm_tex_3d_level_v4s32_f32:
3587 case Intrinsic::nvvm_tex_3d_grad_v4s32_f32:
3588 case Intrinsic::nvvm_tex_cube_v4s32_f32:
3589 case Intrinsic::nvvm_tex_cube_level_v4s32_f32:
3590 case Intrinsic::nvvm_tex_cube_array_v4s32_f32:
3591 case Intrinsic::nvvm_tex_cube_array_level_v4s32_f32:
3592 case Intrinsic::nvvm_tex_cube_v4u32_f32:
3593 case Intrinsic::nvvm_tex_cube_level_v4u32_f32:
3594 case Intrinsic::nvvm_tex_cube_array_v4u32_f32:
3595 case Intrinsic::nvvm_tex_cube_array_level_v4u32_f32:
3596 case Intrinsic::nvvm_tex_1d_v4u32_s32:
3597 case Intrinsic::nvvm_tex_1d_v4u32_f32:
3598 case Intrinsic::nvvm_tex_1d_level_v4u32_f32:
3599 case Intrinsic::nvvm_tex_1d_grad_v4u32_f32:
3600 case Intrinsic::nvvm_tex_1d_array_v4u32_s32:
3601 case Intrinsic::nvvm_tex_1d_array_v4u32_f32:
3602 case Intrinsic::nvvm_tex_1d_array_level_v4u32_f32:
3603 case Intrinsic::nvvm_tex_1d_array_grad_v4u32_f32:
3604 case Intrinsic::nvvm_tex_2d_v4u32_s32:
3605 case Intrinsic::nvvm_tex_2d_v4u32_f32:
3606 case Intrinsic::nvvm_tex_2d_level_v4u32_f32:
3607 case Intrinsic::nvvm_tex_2d_grad_v4u32_f32:
3608 case Intrinsic::nvvm_tex_2d_array_v4u32_s32:
3609 case Intrinsic::nvvm_tex_2d_array_v4u32_f32:
3610 case Intrinsic::nvvm_tex_2d_array_level_v4u32_f32:
3611 case Intrinsic::nvvm_tex_2d_array_grad_v4u32_f32:
3612 case Intrinsic::nvvm_tex_3d_v4u32_s32:
3613 case Intrinsic::nvvm_tex_3d_v4u32_f32:
3614 case Intrinsic::nvvm_tex_3d_level_v4u32_f32:
3615 case Intrinsic::nvvm_tex_3d_grad_v4u32_f32:
3616 case Intrinsic::nvvm_tld4_r_2d_v4s32_f32:
3617 case Intrinsic::nvvm_tld4_g_2d_v4s32_f32:
3618 case Intrinsic::nvvm_tld4_b_2d_v4s32_f32:
3619 case Intrinsic::nvvm_tld4_a_2d_v4s32_f32:
3620 case Intrinsic::nvvm_tld4_r_2d_v4u32_f32:
3621 case Intrinsic::nvvm_tld4_g_2d_v4u32_f32:
3622 case Intrinsic::nvvm_tld4_b_2d_v4u32_f32:
3623 case Intrinsic::nvvm_tld4_a_2d_v4u32_f32:
3624 case Intrinsic::nvvm_tex_unified_1d_v4s32_s32:
3625 case Intrinsic::nvvm_tex_unified_1d_v4s32_f32:
3626 case Intrinsic::nvvm_tex_unified_1d_level_v4s32_f32:
3627 case Intrinsic::nvvm_tex_unified_1d_grad_v4s32_f32:
3628 case Intrinsic::nvvm_tex_unified_1d_array_v4s32_s32:
3629 case Intrinsic::nvvm_tex_unified_1d_array_v4s32_f32:
3630 case Intrinsic::nvvm_tex_unified_1d_array_level_v4s32_f32:
3631 case Intrinsic::nvvm_tex_unified_1d_array_grad_v4s32_f32:
3632 case Intrinsic::nvvm_tex_unified_2d_v4s32_s32:
3633 case Intrinsic::nvvm_tex_unified_2d_v4s32_f32:
3634 case Intrinsic::nvvm_tex_unified_2d_level_v4s32_f32:
3635 case Intrinsic::nvvm_tex_unified_2d_grad_v4s32_f32:
3636 case Intrinsic::nvvm_tex_unified_2d_array_v4s32_s32:
3637 case Intrinsic::nvvm_tex_unified_2d_array_v4s32_f32:
3638 case Intrinsic::nvvm_tex_unified_2d_array_level_v4s32_f32:
3639 case Intrinsic::nvvm_tex_unified_2d_array_grad_v4s32_f32:
3640 case Intrinsic::nvvm_tex_unified_3d_v4s32_s32:
3641 case Intrinsic::nvvm_tex_unified_3d_v4s32_f32:
3642 case Intrinsic::nvvm_tex_unified_3d_level_v4s32_f32:
3643 case Intrinsic::nvvm_tex_unified_3d_grad_v4s32_f32:
3644 case Intrinsic::nvvm_tex_unified_1d_v4u32_s32:
3645 case Intrinsic::nvvm_tex_unified_1d_v4u32_f32:
3646 case Intrinsic::nvvm_tex_unified_1d_level_v4u32_f32:
3647 case Intrinsic::nvvm_tex_unified_1d_grad_v4u32_f32:
3648 case Intrinsic::nvvm_tex_unified_1d_array_v4u32_s32:
3649 case Intrinsic::nvvm_tex_unified_1d_array_v4u32_f32:
3650 case Intrinsic::nvvm_tex_unified_1d_array_level_v4u32_f32:
3651 case Intrinsic::nvvm_tex_unified_1d_array_grad_v4u32_f32:
3652 case Intrinsic::nvvm_tex_unified_2d_v4u32_s32:
3653 case Intrinsic::nvvm_tex_unified_2d_v4u32_f32:
3654 case Intrinsic::nvvm_tex_unified_2d_level_v4u32_f32:
3655 case Intrinsic::nvvm_tex_unified_2d_grad_v4u32_f32:
3656 case Intrinsic::nvvm_tex_unified_2d_array_v4u32_s32:
3657 case Intrinsic::nvvm_tex_unified_2d_array_v4u32_f32:
3658 case Intrinsic::nvvm_tex_unified_2d_array_level_v4u32_f32:
3659 case Intrinsic::nvvm_tex_unified_2d_array_grad_v4u32_f32:
3660 case Intrinsic::nvvm_tex_unified_3d_v4u32_s32:
3661 case Intrinsic::nvvm_tex_unified_3d_v4u32_f32:
3662 case Intrinsic::nvvm_tex_unified_3d_level_v4u32_f32:
3663 case Intrinsic::nvvm_tex_unified_3d_grad_v4u32_f32:
3664 case Intrinsic::nvvm_tex_unified_cube_v4s32_f32:
3665 case Intrinsic::nvvm_tex_unified_cube_level_v4s32_f32:
3666 case Intrinsic::nvvm_tex_unified_cube_array_v4s32_f32:
3667 case Intrinsic::nvvm_tex_unified_cube_array_level_v4s32_f32:
3668 case Intrinsic::nvvm_tex_unified_cube_v4u32_f32:
3669 case Intrinsic::nvvm_tex_unified_cube_level_v4u32_f32:
3670 case Intrinsic::nvvm_tex_unified_cube_array_v4u32_f32:
3671 case Intrinsic::nvvm_tex_unified_cube_array_level_v4u32_f32:
3672 case Intrinsic::nvvm_tld4_unified_r_2d_v4s32_f32:
3673 case Intrinsic::nvvm_tld4_unified_g_2d_v4s32_f32:
3674 case Intrinsic::nvvm_tld4_unified_b_2d_v4s32_f32:
3675 case Intrinsic::nvvm_tld4_unified_a_2d_v4s32_f32:
3676 case Intrinsic::nvvm_tld4_unified_r_2d_v4u32_f32:
3677 case Intrinsic::nvvm_tld4_unified_g_2d_v4u32_f32:
3678 case Intrinsic::nvvm_tld4_unified_b_2d_v4u32_f32:
3679 case Intrinsic::nvvm_tld4_unified_a_2d_v4u32_f32:
3688 case Intrinsic::nvvm_suld_1d_i8_clamp:
3689 case Intrinsic::nvvm_suld_1d_v2i8_clamp:
3690 case Intrinsic::nvvm_suld_1d_v4i8_clamp:
3691 case Intrinsic::nvvm_suld_1d_array_i8_clamp:
3692 case Intrinsic::nvvm_suld_1d_array_v2i8_clamp:
3693 case Intrinsic::nvvm_suld_1d_array_v4i8_clamp:
3694 case Intrinsic::nvvm_suld_2d_i8_clamp:
3695 case Intrinsic::nvvm_suld_2d_v2i8_clamp:
3696 case Intrinsic::nvvm_suld_2d_v4i8_clamp:
3697 case Intrinsic::nvvm_suld_2d_array_i8_clamp:
3698 case Intrinsic::nvvm_suld_2d_array_v2i8_clamp:
3699 case Intrinsic::nvvm_suld_2d_array_v4i8_clamp:
3700 case Intrinsic::nvvm_suld_3d_i8_clamp:
3701 case Intrinsic::nvvm_suld_3d_v2i8_clamp:
3702 case Intrinsic::nvvm_suld_3d_v4i8_clamp:
3703 case Intrinsic::nvvm_suld_1d_i8_trap:
3704 case Intrinsic::nvvm_suld_1d_v2i8_trap:
3705 case Intrinsic::nvvm_suld_1d_v4i8_trap:
3706 case Intrinsic::nvvm_suld_1d_array_i8_trap:
3707 case Intrinsic::nvvm_suld_1d_array_v2i8_trap:
3708 case Intrinsic::nvvm_suld_1d_array_v4i8_trap:
3709 case Intrinsic::nvvm_suld_2d_i8_trap:
3710 case Intrinsic::nvvm_suld_2d_v2i8_trap:
3711 case Intrinsic::nvvm_suld_2d_v4i8_trap:
3712 case Intrinsic::nvvm_suld_2d_array_i8_trap:
3713 case Intrinsic::nvvm_suld_2d_array_v2i8_trap:
3714 case Intrinsic::nvvm_suld_2d_array_v4i8_trap:
3715 case Intrinsic::nvvm_suld_3d_i8_trap:
3716 case Intrinsic::nvvm_suld_3d_v2i8_trap:
3717 case Intrinsic::nvvm_suld_3d_v4i8_trap:
3718 case Intrinsic::nvvm_suld_1d_i8_zero:
3719 case Intrinsic::nvvm_suld_1d_v2i8_zero:
3720 case Intrinsic::nvvm_suld_1d_v4i8_zero:
3721 case Intrinsic::nvvm_suld_1d_array_i8_zero:
3722 case Intrinsic::nvvm_suld_1d_array_v2i8_zero:
3723 case Intrinsic::nvvm_suld_1d_array_v4i8_zero:
3724 case Intrinsic::nvvm_suld_2d_i8_zero:
3725 case Intrinsic::nvvm_suld_2d_v2i8_zero:
3726 case Intrinsic::nvvm_suld_2d_v4i8_zero:
3727 case Intrinsic::nvvm_suld_2d_array_i8_zero:
3728 case Intrinsic::nvvm_suld_2d_array_v2i8_zero:
3729 case Intrinsic::nvvm_suld_2d_array_v4i8_zero:
3730 case Intrinsic::nvvm_suld_3d_i8_zero:
3731 case Intrinsic::nvvm_suld_3d_v2i8_zero:
3732 case Intrinsic::nvvm_suld_3d_v4i8_zero:
3741 case Intrinsic::nvvm_suld_1d_i16_clamp:
3742 case Intrinsic::nvvm_suld_1d_v2i16_clamp:
3743 case Intrinsic::nvvm_suld_1d_v4i16_clamp:
3744 case Intrinsic::nvvm_suld_1d_array_i16_clamp:
3745 case Intrinsic::nvvm_suld_1d_array_v2i16_clamp:
3746 case Intrinsic::nvvm_suld_1d_array_v4i16_clamp:
3747 case Intrinsic::nvvm_suld_2d_i16_clamp:
3748 case Intrinsic::nvvm_suld_2d_v2i16_clamp:
3749 case Intrinsic::nvvm_suld_2d_v4i16_clamp:
3750 case Intrinsic::nvvm_suld_2d_array_i16_clamp:
3751 case Intrinsic::nvvm_suld_2d_array_v2i16_clamp:
3752 case Intrinsic::nvvm_suld_2d_array_v4i16_clamp:
3753 case Intrinsic::nvvm_suld_3d_i16_clamp:
3754 case Intrinsic::nvvm_suld_3d_v2i16_clamp:
3755 case Intrinsic::nvvm_suld_3d_v4i16_clamp:
3756 case Intrinsic::nvvm_suld_1d_i16_trap:
3757 case Intrinsic::nvvm_suld_1d_v2i16_trap:
3758 case Intrinsic::nvvm_suld_1d_v4i16_trap:
3759 case Intrinsic::nvvm_suld_1d_array_i16_trap:
3760 case Intrinsic::nvvm_suld_1d_array_v2i16_trap:
3761 case Intrinsic::nvvm_suld_1d_array_v4i16_trap:
3762 case Intrinsic::nvvm_suld_2d_i16_trap:
3763 case Intrinsic::nvvm_suld_2d_v2i16_trap:
3764 case Intrinsic::nvvm_suld_2d_v4i16_trap:
3765 case Intrinsic::nvvm_suld_2d_array_i16_trap:
3766 case Intrinsic::nvvm_suld_2d_array_v2i16_trap:
3767 case Intrinsic::nvvm_suld_2d_array_v4i16_trap:
3768 case Intrinsic::nvvm_suld_3d_i16_trap:
3769 case Intrinsic::nvvm_suld_3d_v2i16_trap:
3770 case Intrinsic::nvvm_suld_3d_v4i16_trap:
3771 case Intrinsic::nvvm_suld_1d_i16_zero:
3772 case Intrinsic::nvvm_suld_1d_v2i16_zero:
3773 case Intrinsic::nvvm_suld_1d_v4i16_zero:
3774 case Intrinsic::nvvm_suld_1d_array_i16_zero:
3775 case Intrinsic::nvvm_suld_1d_array_v2i16_zero:
3776 case Intrinsic::nvvm_suld_1d_array_v4i16_zero:
3777 case Intrinsic::nvvm_suld_2d_i16_zero:
3778 case Intrinsic::nvvm_suld_2d_v2i16_zero:
3779 case Intrinsic::nvvm_suld_2d_v4i16_zero:
3780 case Intrinsic::nvvm_suld_2d_array_i16_zero:
3781 case Intrinsic::nvvm_suld_2d_array_v2i16_zero:
3782 case Intrinsic::nvvm_suld_2d_array_v4i16_zero:
3783 case Intrinsic::nvvm_suld_3d_i16_zero:
3784 case Intrinsic::nvvm_suld_3d_v2i16_zero:
3785 case Intrinsic::nvvm_suld_3d_v4i16_zero:
3794 case Intrinsic::nvvm_suld_1d_i32_clamp:
3795 case Intrinsic::nvvm_suld_1d_v2i32_clamp:
3796 case Intrinsic::nvvm_suld_1d_v4i32_clamp:
3797 case Intrinsic::nvvm_suld_1d_array_i32_clamp:
3798 case Intrinsic::nvvm_suld_1d_array_v2i32_clamp:
3799 case Intrinsic::nvvm_suld_1d_array_v4i32_clamp:
3800 case Intrinsic::nvvm_suld_2d_i32_clamp:
3801 case Intrinsic::nvvm_suld_2d_v2i32_clamp:
3802 case Intrinsic::nvvm_suld_2d_v4i32_clamp:
3803 case Intrinsic::nvvm_suld_2d_array_i32_clamp:
3804 case Intrinsic::nvvm_suld_2d_array_v2i32_clamp:
3805 case Intrinsic::nvvm_suld_2d_array_v4i32_clamp:
3806 case Intrinsic::nvvm_suld_3d_i32_clamp:
3807 case Intrinsic::nvvm_suld_3d_v2i32_clamp:
3808 case Intrinsic::nvvm_suld_3d_v4i32_clamp:
3809 case Intrinsic::nvvm_suld_1d_i32_trap:
3810 case Intrinsic::nvvm_suld_1d_v2i32_trap:
3811 case Intrinsic::nvvm_suld_1d_v4i32_trap:
3812 case Intrinsic::nvvm_suld_1d_array_i32_trap:
3813 case Intrinsic::nvvm_suld_1d_array_v2i32_trap:
3814 case Intrinsic::nvvm_suld_1d_array_v4i32_trap:
3815 case Intrinsic::nvvm_suld_2d_i32_trap:
3816 case Intrinsic::nvvm_suld_2d_v2i32_trap:
3817 case Intrinsic::nvvm_suld_2d_v4i32_trap:
3818 case Intrinsic::nvvm_suld_2d_array_i32_trap:
3819 case Intrinsic::nvvm_suld_2d_array_v2i32_trap:
3820 case Intrinsic::nvvm_suld_2d_array_v4i32_trap:
3821 case Intrinsic::nvvm_suld_3d_i32_trap:
3822 case Intrinsic::nvvm_suld_3d_v2i32_trap:
3823 case Intrinsic::nvvm_suld_3d_v4i32_trap:
3824 case Intrinsic::nvvm_suld_1d_i32_zero:
3825 case Intrinsic::nvvm_suld_1d_v2i32_zero:
3826 case Intrinsic::nvvm_suld_1d_v4i32_zero:
3827 case Intrinsic::nvvm_suld_1d_array_i32_zero:
3828 case Intrinsic::nvvm_suld_1d_array_v2i32_zero:
3829 case Intrinsic::nvvm_suld_1d_array_v4i32_zero:
3830 case Intrinsic::nvvm_suld_2d_i32_zero:
3831 case Intrinsic::nvvm_suld_2d_v2i32_zero:
3832 case Intrinsic::nvvm_suld_2d_v4i32_zero:
3833 case Intrinsic::nvvm_suld_2d_array_i32_zero:
3834 case Intrinsic::nvvm_suld_2d_array_v2i32_zero:
3835 case Intrinsic::nvvm_suld_2d_array_v4i32_zero:
3836 case Intrinsic::nvvm_suld_3d_i32_zero:
3837 case Intrinsic::nvvm_suld_3d_v2i32_zero:
3838 case Intrinsic::nvvm_suld_3d_v4i32_zero:
3847 case Intrinsic::nvvm_suld_1d_i64_clamp:
3848 case Intrinsic::nvvm_suld_1d_v2i64_clamp:
3849 case Intrinsic::nvvm_suld_1d_array_i64_clamp:
3850 case Intrinsic::nvvm_suld_1d_array_v2i64_clamp:
3851 case Intrinsic::nvvm_suld_2d_i64_clamp:
3852 case Intrinsic::nvvm_suld_2d_v2i64_clamp:
3853 case Intrinsic::nvvm_suld_2d_array_i64_clamp:
3854 case Intrinsic::nvvm_suld_2d_array_v2i64_clamp:
3855 case Intrinsic::nvvm_suld_3d_i64_clamp:
3856 case Intrinsic::nvvm_suld_3d_v2i64_clamp:
3857 case Intrinsic::nvvm_suld_1d_i64_trap:
3858 case Intrinsic::nvvm_suld_1d_v2i64_trap:
3859 case Intrinsic::nvvm_suld_1d_array_i64_trap:
3860 case Intrinsic::nvvm_suld_1d_array_v2i64_trap:
3861 case Intrinsic::nvvm_suld_2d_i64_trap:
3862 case Intrinsic::nvvm_suld_2d_v2i64_trap:
3863 case Intrinsic::nvvm_suld_2d_array_i64_trap:
3864 case Intrinsic::nvvm_suld_2d_array_v2i64_trap:
3865 case Intrinsic::nvvm_suld_3d_i64_trap:
3866 case Intrinsic::nvvm_suld_3d_v2i64_trap:
3867 case Intrinsic::nvvm_suld_1d_i64_zero:
3868 case Intrinsic::nvvm_suld_1d_v2i64_zero:
3869 case Intrinsic::nvvm_suld_1d_array_i64_zero:
3870 case Intrinsic::nvvm_suld_1d_array_v2i64_zero:
3871 case Intrinsic::nvvm_suld_2d_i64_zero:
3872 case Intrinsic::nvvm_suld_2d_v2i64_zero:
3873 case Intrinsic::nvvm_suld_2d_array_i64_zero:
3874 case Intrinsic::nvvm_suld_2d_array_v2i64_zero:
3875 case Intrinsic::nvvm_suld_3d_i64_zero:
3876 case Intrinsic::nvvm_suld_3d_v2i64_zero:
3932 if (Constraint.
size() == 1) {
3933 switch (Constraint[0]) {
3951 std::pair<unsigned, const TargetRegisterClass *>
3955 if (Constraint.
size() == 1) {
3956 switch (Constraint[0]) {
3958 return std::make_pair(0U, &NVPTX::Int1RegsRegClass);
3960 return std::make_pair(0U, &NVPTX::Int16RegsRegClass);
3962 return std::make_pair(0U, &NVPTX::Int16RegsRegClass);
3964 return std::make_pair(0U, &NVPTX::Int32RegsRegClass);
3967 return std::make_pair(0U, &NVPTX::Int64RegsRegClass);
3969 return std::make_pair(0U, &NVPTX::Float32RegsRegClass);
3971 return std::make_pair(0U, &NVPTX::Float64RegsRegClass);
4061 int nonAddCount = 0;
4079 if (orderNo - orderNo2 < 500)
4084 bool opIsLive =
false;
4088 if (isa<ConstantSDNode>(left) || isa<ConstantSDNode>(right))
4095 if (orderNo3 > orderNo) {
4105 if (orderNo3 > orderNo) {
4151 if (isa<ConstantSDNode>(Val)) {
4175 if (MaskVal != 0xff) {
4202 if (AExt.
getNode() !=
nullptr) {
4235 if (U->getOpcode() == DivOpc && U->getOperand(0) == Num &&
4240 DAG.
getNode(DivOpc, DL, VT, Num, Den),
4296 IsSigned = (LHSSign ==
Signed);
4300 const APInt &Val = CI->getAPIntValue();
4302 return Val.
isIntN(OptSize);
4311 return LHSSign == RHSSign;
4333 if (isa<ConstantSDNode>(LHS)) {
4347 if (ShiftAmt.
sge(0) && ShiftAmt.
slt(BitWidth)) {
4348 APInt MulVal =
APInt(BitWidth, 1) << ShiftAmt;
4382 return DCI.
DAG.
getNode(Opc, DL, MulType, TruncLHS, TruncRHS);
4433 DAGCombinerInfo &DCI)
const {
4491 unsigned PrefAlign =
4493 if (Align < PrefAlign) {
4508 bool NeedTrunc =
false;
4514 unsigned Opcode = 0;
4516 bool LoadF16x2 =
false;
4560 for (
unsigned i = 0; i < NumElts; ++i) {
4570 for (
unsigned i = 0; i < NumElts; ++i) {
4593 unsigned IntrinNo = cast<ConstantSDNode>(Intrin.
getNode())->getZExtValue();
4597 case Intrinsic::nvvm_ldg_global_i:
4598 case Intrinsic::nvvm_ldg_global_f:
4599 case Intrinsic::nvvm_ldg_global_p:
4600 case Intrinsic::nvvm_ldu_global_i:
4601 case Intrinsic::nvvm_ldu_global_f:
4602 case Intrinsic::nvvm_ldu_global_p: {
4615 bool NeedTrunc =
false;
4621 unsigned Opcode = 0;
4631 case Intrinsic::nvvm_ldg_global_i:
4632 case Intrinsic::nvvm_ldg_global_f:
4633 case Intrinsic::nvvm_ldg_global_p:
4636 case Intrinsic::nvvm_ldu_global_i:
4637 case Intrinsic::nvvm_ldu_global_f:
4638 case Intrinsic::nvvm_ldu_global_p:
4648 case Intrinsic::nvvm_ldg_global_i:
4649 case Intrinsic::nvvm_ldg_global_f:
4650 case Intrinsic::nvvm_ldg_global_p:
4653 case Intrinsic::nvvm_ldu_global_i:
4654 case Intrinsic::nvvm_ldu_global_f:
4655 case Intrinsic::nvvm_ldu_global_p:
4682 for (
unsigned i = 0; i < NumElts; ++i) {
4700 "Custom handling of non-i8 ldu/ldg?");
4717 NewLD.getValue(0)));
4724 void NVPTXTargetLowering::ReplaceNodeResults(
4743 return getDataSection();
static unsigned getBitWidth(Type *Ty, const DataLayout &DL)
Returns the bitwidth of the given scalar or pointer type.
BITCAST - This operator converts between integer, vector and FP values, as if the value was stored to...
Instances of this class represent a uniqued identifier for a section in the current translation unit...
void push_back(const T &Elt)
A parsed version of the target data layout string in and methods for querying it. ...
const_iterator end(StringRef path)
Get end iterator over path.
constexpr char Align[]
Key for Kernel::Arg::Metadata::mAlign.
FMINNUM/FMAXNUM - Perform floating-point minimum or maximum on two values.
EVT getValueType() const
Return the ValueType of the referenced return value.
bool getTgtMemIntrinsic(IntrinsicInfo &Info, const CallInst &I, MachineFunction &MF, unsigned Intrinsic) const override
Given an intrinsic, checks if on the target the intrinsic will need to map to a MemIntrinsicNode (tou...
This represents an addressing mode of: BaseGV + BaseOffs + BaseReg + Scale*ScaleReg If BaseGV is null...
void setLoadExtAction(unsigned ExtType, MVT ValVT, MVT MemVT, LegalizeAction Action)
Indicate that the specified load with extension does not work with the specified type and indicate wh...
This SDNode is used for target intrinsics that touch memory and need an associated MachineMemOperand...
const GlobalValue * getGlobal() const
unsigned getOpcode() const
Return the SelectionDAG opcode value for this node.
This class represents an incoming formal argument to a Function.
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
SDValue getSetCC(const SDLoc &DL, EVT VT, SDValue LHS, SDValue RHS, ISD::CondCode Cond)
Helper function to make it easier to build SetCC's if you just have an ISD::CondCode instead of an SD...
SDValue CombineTo(SDNode *N, ArrayRef< SDValue > To, bool AddTo=true)
SDValue getCALLSEQ_END(SDValue Chain, SDValue Op1, SDValue Op2, SDValue InGlue, const SDLoc &DL)
Return a new CALLSEQ_END node, which always must have a glue result (to ensure it's not CSE'd)...
static unsigned CanMergeParamLoadStoresStartingAt(unsigned Idx, uint32_t AccessSize, const SmallVectorImpl< EVT > &ValueVTs, const SmallVectorImpl< uint64_t > &Offsets, unsigned ParamAlignment)
uint64_t GreatestCommonDivisor64(uint64_t A, uint64_t B)
Return the greatest common divisor of the values using Euclid's algorithm.
bool getAlign(const Function &F, unsigned index, unsigned &align)
EXTRACT_SUBVECTOR(VECTOR, IDX) - Returns a subvector from VECTOR (an vector value) starting with the ...
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
BR_CC - Conditional branch.
Compute iterated dominance frontiers using a linear time algorithm.
VECTOR_SHUFFLE(VEC1, VEC2) - Returns a vector, of the same type as VEC1/VEC2.
EVT getScalarType() const
If this is a vector type, return the element type, otherwise return this.
A Module instance is used to store all the information related to an LLVM module. ...
bool isSized(SmallPtrSetImpl< Type *> *Visited=nullptr) const
Return true if it makes sense to take the size of this type.
unsigned getIROrder() const
Return the node ordering.
const SDValue & getBasePtr() const
EVT getValueType(unsigned ResNo) const
Return the type of a specified result.
virtual void LowerAsmOperandForConstraint(SDValue Op, std::string &Constraint, std::vector< SDValue > &Ops, SelectionDAG &DAG) const
Lower the specified operand into the Ops vector.
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE size_t size() const
size - Get the string size.
APInt zext(unsigned width) const
Zero extend to a new width.
MachineMemOperand::Flags flags
bool slt(const APInt &RHS) const
Signed less than comparison.
const SDValue & getValue() const
This class represents a function call, abstracting a target machine's calling convention.
std::string getPrototype(const DataLayout &DL, Type *, const ArgListTy &, const SmallVectorImpl< ISD::OutputArg > &, unsigned retAlignment, ImmutableCallSite CS) const
MVT getSimpleVT() const
Return the SimpleValueType held in the specified simple EVT.
static PointerType * get(Type *ElementType, unsigned AddressSpace)
This constructs a pointer to an object of the specified type in a numbered address space...
static bool IsMulWideOperandDemotable(SDValue Op, unsigned OptSize, OperandSignedness &S)
IsMulWideOperandDemotable - Checks if the provided DAG node is an operand that can be demoted to OptS...
const SDValue & getChain() const
static bool isImageOrSamplerVal(const Value *arg, const Module *context)
Function Alias Analysis Results
bool useF32FTZ(const MachineFunction &MF) const
unsigned getAlignment() const
bool hasFnAttribute(Attribute::AttrKind Kind) const
Return true if the function has the attribute.
virtual std::pair< unsigned, const TargetRegisterClass * > getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, StringRef Constraint, MVT VT) const
Given a physical register constraint (e.g.
void setBooleanVectorContents(BooleanContent Ty)
Specify how the target extends the result of a vector boolean value from a vector of i1 to a wider ty...
unsigned const TargetRegisterInfo * TRI
ConstraintType getConstraintType(StringRef Constraint) const override
getConstraintType - Given a constraint letter, return the type of constraint it is for this target...
bool isInteger() const
Return true if this is an integer or a vector integer type.
[US]{MIN/MAX} - Binary minimum or maximum or signed or unsigned integers.
SDNode * getNode() const
get the SDNode which holds the desired result
SDValue getTargetExternalSymbol(const char *Sym, EVT VT, unsigned char TargetFlags=0)
SDValue getNode(unsigned Opcode, const SDLoc &DL, EVT VT, ArrayRef< SDUse > Ops)
Gets or creates the specified node.
bool isVectorTy() const
True if this is an instance of VectorType.
const SDValue & setRoot(SDValue N)
Set the current root tag of the SelectionDAG.
MachineMemOperand * getMemOperand() const
Return a MachineMemOperand object describing the memory reference performed by operation.
SDValue LowerCall(CallLoweringInfo &CLI, SmallVectorImpl< SDValue > &InVals) const override
This hook must be implemented to lower calls into the specified DAG.
unsigned getValueSizeInBits() const
Returns the size of the value in bits.
void LowerAsmOperandForConstraint(SDValue Op, std::string &Constraint, std::vector< SDValue > &Ops, SelectionDAG &DAG) const override
Lower the specified operand into the Ops vector.
Select with condition operator - This selects between a true value and a false value (ops #2 and #3) ...
void setTruncStoreAction(MVT ValVT, MVT MemVT, LegalizeAction Action)
Indicate that the specified truncating store does not work with the specified type and indicate what ...
RESULT,OUTCHAIN = INTRINSIC_W_CHAIN(INCHAIN, INTRINSICID, arg1, ...) This node represents a target in...
static Constant * getNullValue(Type *Ty)
Constructor to create a '0' constant of arbitrary type.
SDValue LowerReturn(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::OutputArg > &Outs, const SmallVectorImpl< SDValue > &OutVals, const SDLoc &dl, SelectionDAG &DAG) const override
This hook must be implemented to lower outgoing return values, described by the Outs array...
unsigned getAddressSpace() const
Return the address space for the associated pointer.
MCSection * SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const override
bool isFloatingPoint() const
Return true if this is a FP or a vector FP type.
SHL_PARTS/SRA_PARTS/SRL_PARTS - These operators are used for expanded integer shift operations...
SDValue getIntPtrConstant(uint64_t Val, const SDLoc &DL, bool isTarget=false)
static SDValue PerformREMCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI, CodeGenOpt::Level OptLevel)
static unsigned int uniqueCallSite
static bool AreMulWideOperandsDemotable(SDValue LHS, SDValue RHS, unsigned OptSize, bool &IsSigned)
AreMulWideOperandsDemotable - Checks if the given LHS and RHS operands can be demoted to OptSize bits...
bool hasOneUse() const
Return true if there is exactly one use of this node.
const DataLayout & getDataLayout() const
Get the data layout for the module's target platform.
static cl::opt< bool > UsePrecSqrtF32("nvptx-prec-sqrtf32", cl::Hidden, cl::desc("NVPTX Specific: 0 use sqrt.approx, 1 use sqrt.rn."), cl::init(true))
TypeID getTypeID() const
Return the type id for the type.
bool isFloatingPointTy() const
Return true if this is one of the six floating-point types.
APInt shl(unsigned shiftAmt) const
Left-shift function.
Shift and rotation operations.
static void ComputePTXValueVTs(const TargetLowering &TLI, const DataLayout &DL, Type *Ty, SmallVectorImpl< EVT > &ValueVTs, SmallVectorImpl< uint64_t > *Offsets=nullptr, uint64_t StartingOffset=0)
ComputePTXValueVTs - For the given Type Ty, returns the set of primitive EVTs that compose it...
Type * getTypeForEVT(LLVMContext &Context) const
This method returns an LLVM type corresponding to the specified EVT.
Class to represent struct types.
ABS - Determine the unsigned absolute value of a signed integer value of the same bitwidth...
const TargetMachine & getTarget() const
getTarget - Return the target machine this machine code is compiled with
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
bool isIntegerTy() const
True if this is an instance of IntegerType.
op_iterator op_end() const
ISD::LoadExtType getExtensionType() const
Return whether this is a plain node, or one of the varieties of value-extending loads.
This file contains the simple types necessary to represent the attributes associated with functions a...
unsigned getStoreSize() const
Return the number of bytes overwritten by a store of the specified value type.
InstrTy * getInstruction() const
void addBypassSlowDiv(unsigned int SlowBitWidth, unsigned int FastBitWidth)
Tells the code generator which bitwidths to bypass.
The memory access is dereferenceable (i.e., doesn't trap).
void setOperationAction(unsigned Op, MVT VT, LegalizeAction Action)
Indicate that the specified operation does not work with the specified type and indicate what to do a...
const DataLayout & getDataLayout() const
SDVTList getVTList(EVT VT)
Return an SDVTList that represents the list of values specified.
FRAMEADDR, RETURNADDR - These nodes represent llvm.frameaddress and llvm.returnaddress on the DAG...
static void ReplaceLoadVector(SDNode *N, SelectionDAG &DAG, SmallVectorImpl< SDValue > &Results)
ReplaceVectorLoad - Convert vector loads into multi-output scalar loads.
void setJumpIsExpensive(bool isExpensive=true)
Tells the code generator not to expand logic operations on comparison predicates into separate sequen...
This class defines information used to lower LLVM code to legal SelectionDAG operators that the targe...
This file implements a class to represent arbitrary precision integral constant values and operations...
This represents a list of ValueType's that has been intern'd by a SelectionDAG.
SmallVector< ISD::InputArg, 32 > Ins
int getDivF32Level() const
SDValue getMergeValues(ArrayRef< SDValue > Ops, const SDLoc &dl)
Create a MERGE_VALUES node from the given operands.
void assign(size_type NumElts, const T &Elt)
bool usePrecSqrtF32() const
A constant value that is initialized with an expression using other constant values.
unsigned getSizeInBits() const
Return the size of the specified value type in bits.
bool isKernelFunction(const Function &F)
Type * getType() const
All values are typed, get the type of this value.
MachineFunction & getMachineFunction() const
void computeRegisterProperties(const TargetRegisterInfo *TRI)
Once all of the register classes are added, this allows us to compute derived properties we expose...
[SU]INT_TO_FP - These operators convert integers (whose interpreted sign depends on the first letter)...
virtual TargetLoweringBase::LegalizeTypeAction getPreferredVectorAction(EVT VT) const
Return the preferred vector type legalization action.
Simple integer binary arithmetic operators.
ManagedStringPool * getManagedStrPool() const
SmallVector< ISD::OutputArg, 32 > Outs
SDValue LowerFormalArguments(SDValue Chain, CallingConv::ID CallConv, bool isVarArg, const SmallVectorImpl< ISD::InputArg > &Ins, const SDLoc &dl, SelectionDAG &DAG, SmallVectorImpl< SDValue > &InVals) const override
This hook must be implemented to lower the incoming (formal) arguments, described by the Ins array...
op_iterator op_begin() const
std::pair< SDValue, SDValue > expandUnalignedLoad(LoadSDNode *LD, SelectionDAG &DAG) const
Expands an unaligned load to 2 half-size loads for an integer, and possibly more for vectors...
static SDValue PerformADDCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI, const NVPTXSubtarget &Subtarget, CodeGenOpt::Level OptLevel)
PerformADDCombine - Target-specific dag combine xforms for ISD::ADD.
void setIROrder(unsigned Order)
Set the node ordering.
static SDValue PerformANDCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI)
bool isLegalAddressingMode(const DataLayout &DL, const AddrMode &AM, Type *Ty, unsigned AS, Instruction *I=nullptr) const override
isLegalAddressingMode - Return true if the addressing mode represented by AM is legal for this target...
amdgpu Simplify well known AMD library false Value * Callee
RESULT = INTRINSIC_WO_CHAIN(INTRINSICID, arg1, arg2, ...) This node represents a target intrinsic fun...
void ComputeValueVTs(const TargetLowering &TLI, const DataLayout &DL, Type *Ty, SmallVectorImpl< EVT > &ValueVTs, SmallVectorImpl< uint64_t > *Offsets=nullptr, uint64_t StartingOffset=0)
ComputeValueVTs - Given an LLVM IR type, compute a sequence of EVTs that represent all the individual...
Class to represent pointers.
StringRef getName() const
getName - Return the name of the corresponding LLVM function.
UNDEF - An undefined node.
This class is used to represent ISD::STORE nodes.
static SDValue PerformADDCombineWithOperands(SDNode *N, SDValue N0, SDValue N1, TargetLowering::DAGCombinerInfo &DCI, const NVPTXSubtarget &Subtarget, CodeGenOpt::Level OptLevel)
PerformADDCombineWithOperands - Try DAG combinations for an ADD with operands N0 and N1...
FP_TO_[US]INT - Convert a floating point value to a signed or unsigned integer.
BUILD_VECTOR(ELT0, ELT1, ELT2, ELT3,...) - Return a vector with the specified, possibly variable...
AttributeSet getAttributes(unsigned Index) const
The attributes for the specified index are returned.
bool allowFMA(MachineFunction &MF, CodeGenOpt::Level OptLevel) const
const SDValue & getBasePtr() const
initializer< Ty > init(const Ty &Val)
Type * getReturnType() const
Returns the type of the ret val.
OUTCHAIN = INTRINSIC_VOID(INCHAIN, INTRINSICID, arg1, arg2, ...) This node represents a target intrin...
unsigned UnsafeFPMath
UnsafeFPMath - This flag is enabled when the -enable-unsafe-fp-math flag is specified on the command ...
FPOpFusion::FPOpFusionMode AllowFPOpFusion
AllowFPOpFusion - This flag is set by the -fuse-fp-ops=xxx option.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
CodeGenOpt::Level getOptLevel() const
Returns the optimization level: None, Less, Default, or Aggressive.
MVT getPointerTy(const DataLayout &DL, uint32_t AS=0) const
Return the pointer type for the given address space, defaults to the pointer type from the data layou...
use_iterator use_begin() const
Provide iteration support to walk over all uses of an SDNode.
constexpr bool isPowerOf2_32(uint32_t Value)
Return true if the argument is a power of two > 0.
The instances of the Type class are immutable: once they are created, they are never changed...
static cl::opt< unsigned > FMAContractLevelOpt("nvptx-fma-level", cl::ZeroOrMore, cl::Hidden, cl::desc("NVPTX Specific: FMA contraction (0: don't do it" " 1: do it 2: do it aggressively"), cl::init(2))
void addRegisterClass(MVT VT, const TargetRegisterClass *RC)
Add the specified register class as an available regclass for the specified value type...
static cl::opt< bool > sched4reg("nvptx-sched4reg", cl::desc("NVPTX Specific: schedule for register pressue"), cl::init(false))
virtual ConstraintType getConstraintType(StringRef Constraint) const
Given a constraint, return the type of constraint it is for this target.
Simple binary floating point operators.
void setTargetDAGCombine(ISD::NodeType NT)
Targets should invoke this method for each target independent node that they want to provide a custom...
unsigned getVectorNumElements() const
Given a vector type, return the number of elements it contains.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
const SDValue & getOperand(unsigned Num) const
INSERT_VECTOR_ELT(VECTOR, VAL, IDX) - Returns VECTOR with the element at IDX replaced with VAL...
This file contains the declarations for the subclasses of Constant, which represent the different fla...
bool isPointerTy() const
True if this is an instance of PointerType.
const NVPTXTargetLowering * getTargetLowering() const override
SDValue getCALLSEQ_START(SDValue Chain, uint64_t InSize, uint64_t OutSize, const SDLoc &DL)
Return a new CALLSEQ_START node, that starts new call frame, in which InSize bytes are set up inside ...
void setBooleanContents(BooleanContent Ty)
Specify how the target extends the result of integer and floating point boolean values from i1 to a w...
static unsigned getOpcForSurfaceInstr(unsigned Intrinsic)
unsigned getPrefTypeAlignment(Type *Ty) const
Returns the preferred stack/global alignment for the specified type.
This class provides iterator support for SDUse operands that use a specific SDNode.
bool isHalfTy() const
Return true if this is 'half', a 16-bit IEEE fp type.
std::pair< unsigned, const TargetRegisterClass * > getRegForInlineAsmConstraint(const TargetRegisterInfo *TRI, StringRef Constraint, MVT VT) const override
Given a physical register constraint (e.g.
TRAP - Trapping instruction.
const APInt & getAPIntValue() const
SectionKind - This is a simple POD value that classifies the properties of a section.
static mvt_range vector_valuetypes()
SDValue getMemIntrinsicNode(unsigned Opcode, const SDLoc &dl, SDVTList VTList, ArrayRef< SDValue > Ops, EVT MemVT, MachinePointerInfo PtrInfo, unsigned Align=0, MachineMemOperand::Flags Flags=MachineMemOperand::MOLoad|MachineMemOperand::MOStore, unsigned Size=0)
Creates a MemIntrinsicNode that may produce a result and takes a list of operands.
bool isIntN(unsigned N) const
Check if this APInt has an N-bits unsigned integer value.
unsigned MaxStoresPerMemmove
Specify maximum bytes of store instructions per memmove call.
const char * getTargetNodeName(unsigned Opcode) const override
This method returns the name of a target specific DAG node.
static void ReplaceINTRINSIC_W_CHAIN(SDNode *N, SelectionDAG &DAG, SmallVectorImpl< SDValue > &Results)
std::vector< ArgListEntry > ArgListTy
bool allowUnsafeFPMath(MachineFunction &MF) const
static SDValue PerformSHLCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI, CodeGenOpt::Level OptLevel)
PerformSHLCombine - Runs PTX-specific DAG combine patterns on SHL nodes.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
This structure contains all information that is necessary for lowering calls.
auto find(R &&Range, const T &Val) -> decltype(adl_begin(Range))
Provide wrappers to std::find which take ranges instead of having to pass begin/end explicitly...
const TargetMachine & getTargetMachine() const
static cl::opt< int > UsePrecDivF32("nvptx-prec-divf32", cl::ZeroOrMore, cl::Hidden, cl::desc("NVPTX Specifies: 0 use div.approx, 1 use div.full, 2 use" " IEEE Compliant F32 div.rnd if available."), cl::init(2))
This class contains a discriminated union of information about pointers in memory operands...
bool isMachineOpcode() const
Test if this node has a post-isel opcode, directly corresponding to a MachineInstr opcode...
unsigned getNumOperands() const
Return the number of values used by this operation.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
EVT getValueType(const DataLayout &DL, Type *Ty, bool AllowUnknown=false) const
Return the EVT corresponding to this LLVM type.
static bool IsPTXVectorType(MVT VT)
SDValue getLoad(EVT VT, const SDLoc &dl, SDValue Chain, SDValue Ptr, MachinePointerInfo PtrInfo, unsigned Alignment=0, MachineMemOperand::Flags MMOFlags=MachineMemOperand::MONone, const AAMDNodes &AAInfo=AAMDNodes(), const MDNode *Ranges=nullptr)
Loads are not normal binary operators: their result type is not determined by their operands...
unsigned getAddressSpace() const
The memory access writes data.
static SDValue TryMULWIDECombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI)
TryMULWIDECombine - Attempt to replace a multiply of M bits with a multiply of M/2 bits that produces...
LegalizeAction
This enum indicates whether operations are valid for a target, and if not, what action should be used...
TokenFactor - This node takes multiple tokens as input and produces a single token result...
const TargetLowering & getTargetLoweringInfo() const
bool hasParamAttribute(unsigned ArgNo, Attribute::AttrKind Kind) const
Equivalent to hasAttribute(ArgNo + FirstArgIndex, Kind).
TargetLoweringBase::LegalizeTypeAction getPreferredVectorAction(EVT VT) const override
Return the preferred vector type legalization action.
SmallVectorImpl< T >::const_pointer c_str(SmallVectorImpl< T > &str)
auto size(R &&Range, typename std::enable_if< std::is_same< typename std::iterator_traits< decltype(Range.begin())>::iterator_category, std::random_access_iterator_tag >::value, void >::type *=nullptr) -> decltype(std::distance(Range.begin(), Range.end()))
Get the size of a range.
std::string * getManagedString(const char *S)
SDValue getSqrtEstimate(SDValue Operand, SelectionDAG &DAG, int Enabled, int &ExtraSteps, bool &UseOneConst, bool Reciprocal) const override
Hooks for building estimates in place of slower divisions and square roots.
EXTRACT_VECTOR_ELT(VECTOR, IDX) - Returns a single element from VECTOR identified by the (potentially...
EVT getVectorElementType() const
Given a vector type, return the type of each element.
This is used to represent a portion of an LLVM function in a low-level Data Dependence DAG representa...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Module.h This file contains the declarations for the Module class.
NVPTXTargetLowering(const NVPTXTargetMachine &TM, const NVPTXSubtarget &STI)
SDValue getBuildVector(EVT VT, const SDLoc &DL, ArrayRef< SDValue > Ops)
Return an ISD::BUILD_VECTOR node.
unsigned getABITypeAlignment(Type *Ty) const
Returns the minimum ABI-required alignment for the specified type.
bool isAggregateType() const
Return true if the type is an aggregate type.
Byte Swap and Counting operators.
This is an abstract virtual class for memory operations.
Wrapper class for IR location info (IR ordering and DebugLoc) to be passed into SDNode creation funct...
Represents one node in the SelectionDAG.
const Function & getFunction() const
Return the LLVM function that this machine code represents.
static mvt_range integer_valuetypes()
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
const Module * getModule() const
Return the module owning the function this instruction belongs to or nullptr it the function does not...
static EVT getVectorVT(LLVMContext &Context, EVT VT, unsigned NumElements, bool IsScalable=false)
Returns the EVT that represents a vector NumElements in length, where each element is of type VT...
EVT getMemoryVT() const
Return the type of the in-memory value.
Class for arbitrary precision integers.
static SDValue PerformMULCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI, CodeGenOpt::Level OptLevel)
PerformMULCombine - Runs PTX-specific DAG combine patterns on MUL nodes.
iterator_range< use_iterator > uses()
Select(COND, TRUEVAL, FALSEVAL).
bool sge(const APInt &RHS) const
Signed greater or equal comparison.
static use_iterator use_end()
ZERO_EXTEND - Used for integer types, zeroing the new bits.
ANY_EXTEND - Used for integer types. The high bits are undefined.
static cl::opt< bool > FtzEnabled("nvptx-f32ftz", cl::ZeroOrMore, cl::Hidden, cl::desc("NVPTX Specific: Flush f32 subnormals to sign-preserving zero."), cl::init(false))
SDValue expandUnalignedStore(StoreSDNode *ST, SelectionDAG &DAG) const
Expands an unaligned store to 2 half-size stores for integer values, and possibly more for vectors...
FCOPYSIGN(X, Y) - Return the value of X with the sign of Y.
FMINNAN/FMAXNAN - Behave identically to FMINNUM/FMAXNUM, except that when a single input is NaN...
void append(in_iter in_start, in_iter in_end)
Add the specified range to the end of the SmallVector.
amdgpu Simplify well known AMD library false Value Value * Arg
The memory access reads data.
uint64_t getTypeAllocSize(Type *Ty) const
Returns the offset in bytes between successive objects of the specified type, including alignment pad...
BR_JT - Jumptable branch.
SmallVector< SDValue, 32 > OutVals
bool isVector() const
Return true if this is a vector value type.
Bitwise operators - logical and, logical or, logical xor.
SMUL_LOHI/UMUL_LOHI - Multiply two integers of type iN, producing a signed/unsigned value of type i[2...
LLVM_NODISCARD bool empty() const
StringRef getValueAsString() const
Return the attribute's value as a string.
SDValue LowerOperation(SDValue Op, SelectionDAG &DAG) const override
This callback is invoked for operations that are unsupported by the target, which are registered to u...
static SDValue PerformSETCCCombine(SDNode *N, TargetLowering::DAGCombinerInfo &DCI)
SIGN_EXTEND_INREG - This operator atomically performs a SHL/SRA pair to sign extend a small value in ...
LOAD and STORE have token chains as their first operand, then the same operands as an LLVM load/store...
PointerUnion< const Value *, const PseudoSourceValue * > ptrVal
Establish a view to a call site for examination.
Flags getFlags() const
Return the raw flags of the source value,.
The memory access always returns the same value (or traps).
LLVM_NODISCARD std::enable_if<!is_simple_type< Y >::value, typename cast_retty< X, const Y >::ret_type >::type dyn_cast(const Y &Val)
SDValue LowerGlobalAddress(SDValue Op, SelectionDAG &DAG) const
unsigned getOpcode() const
SDValue getValue(unsigned R) const
unsigned MaxStoresPerMemcpy
Specify maximum bytes of store instructions per memcpy call.
static SmallVector< ParamVectorizationFlags, 16 > VectorizePTXValueVTs(const SmallVectorImpl< EVT > &ValueVTs, const SmallVectorImpl< uint64_t > &Offsets, unsigned ParamAlignment)
bool isSignedIntN(unsigned N) const
Check if this APInt has an N-bits signed integer value.
unsigned getNumRegisters(LLVMContext &Context, EVT VT) const
Return the number of registers that this ValueType will eventually require.
const SDValue & getRoot() const
Return the root tag of the SelectionDAG.
SDValue getConstant(uint64_t Val, const SDLoc &DL, EVT VT, bool isTarget=false, bool isOpaque=false)
Create a ConstantSDNode wrapping a constant value.
FunTy * getCalledFunction() const
Return the function being called if this is a direct call, otherwise return null (if it's an indirect...
const MachinePointerInfo & getPointerInfo() const
CONCAT_VECTORS(VECTOR0, VECTOR1, ...) - Given a number of values of vector type with the same length ...
bool allowsMemoryAccess(LLVMContext &Context, const DataLayout &DL, EVT VT, unsigned AddrSpace=0, unsigned Alignment=1, bool *Fast=nullptr) const
Return true if the target supports a memory access of this type for the given address space and align...
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
SDValue getTruncStore(SDValue Chain, const SDLoc &dl, SDValue Val, SDValue Ptr, MachinePointerInfo PtrInfo, EVT SVT, unsigned Alignment=0, MachineMemOperand::Flags MMOFlags=MachineMemOperand::MONone, const AAMDNodes &AAInfo=AAMDNodes())
LegalizeTypeAction
This enum indicates whether a types are legal for a target, and if not, what action should be used to...
Value * getArgOperand(unsigned i) const
getArgOperand/setArgOperand - Return/set the i-th call argument.
A raw_ostream that writes to an std::string.
void setSchedulingPreference(Sched::Preference Pref)
Specify the target scheduling preference.
unsigned getPrimitiveSizeInBits() const LLVM_READONLY
Return the basic size of this type if it is a primitive type.
Module * getParent()
Get the module that this global value is contained inside of...
LLVM Value Representation.
FMA - Perform a * b + c with no intermediate rounding step.
bool allowFP16Math() const
unsigned getMachineOpcode() const
This may only be called if isMachineOpcode returns true.
SDValue getSelectCC(const SDLoc &DL, SDValue LHS, SDValue RHS, SDValue True, SDValue False, ISD::CondCode Cond)
Helper function to make it easier to build SelectCC's if you just have an ISD::CondCode instead of an...
unsigned int getSmVersion() const
std::underlying_type< E >::type Mask()
Get a bitmask with 1s in all places up to the high-order bit of E's largest value.
static const Function * getParent(const Value *V)
Attribute getFnAttribute(Attribute::AttrKind Kind) const
Return the attribute for the given attribute kind.
bool isCast() const
Return true if this is a convert constant expression.
Primary interface to the complete machine description for the target machine.
uint64_t getTypeAllocSizeInBits(Type *Ty) const
Returns the offset in bits between successive objects of the specified type, including alignment padd...
~NVPTXTargetObjectFile() override
StringRef - Represent a constant reference to a string, i.e.
SetCC operator - This evaluates to a true value iff the condition is true.
unsigned MaxStoresPerMemset
Specify maximum number of store instructions per memset call.
unsigned getNumOperands() const
const SDValue & getOperand(unsigned i) const
uint64_t getZExtValue() const
TRUNCATE - Completely drop the high bits.
bool isSimple() const
Test if the given EVT is simple (as opposed to being extended).
Unlike LLVM values, Selection DAG nodes may return multiple values as the result of a computation...
FNEG, FABS, FSQRT, FSIN, FCOS, FPOWI, FPOW, FLOG, FLOG2, FLOG10, FEXP, FEXP2, FCEIL, FTRUNC, FRINT, FNEARBYINT, FROUND, FFLOOR - Perform various unary floating point operations.
LLVMContext * getContext() const
constexpr char Args[]
Key for Kernel::Metadata::mArgs.
static unsigned getOpcForTextureInstr(unsigned Intrinsic)
This file describes how to lower LLVM code to machine code.
SDValue getTargetGlobalAddress(const GlobalValue *GV, const SDLoc &DL, EVT VT, int64_t offset=0, unsigned char TargetFlags=0)
const NVPTXRegisterInfo * getRegisterInfo() const override
This class is used to represent ISD::LOAD nodes.
const NVPTXTargetMachine * nvTM