Lines Matching refs:VT
118 bool ConstantFPSDNode::isValueValidForType(EVT VT, in isValueValidForType() argument
120 assert(VT.isFloatingPoint() && "Can only convert between FP types"); in isValueValidForType()
125 (void) Val2.convert(SelectionDAG::EVTToAPFloatSemantics(VT), in isValueValidForType()
794 EVT VT = N->getValueType(0); in VerifySDNode() local
796 assert(!VT.isVector() && (VT.isInteger() || VT.isFloatingPoint()) && in VerifySDNode()
801 assert(N->getOperand(0).getValueType().isInteger() == VT.isInteger() && in VerifySDNode()
803 assert(VT.getSizeInBits() == 2 * N->getOperand(0).getValueSizeInBits() && in VerifySDNode()
869 EVT VT = cast<VTSDNode>(N)->getVT(); in RemoveNodeFromCSEMaps() local
870 if (VT.isExtended()) { in RemoveNodeFromCSEMaps()
871 Erased = ExtendedValueTypeNodes.erase(VT); in RemoveNodeFromCSEMaps()
873 Erased = ValueTypeNodes[VT.getSimpleVT().SimpleTy] != nullptr; in RemoveNodeFromCSEMaps()
874 ValueTypeNodes[VT.getSimpleVT().SimpleTy] = nullptr; in RemoveNodeFromCSEMaps()
985 unsigned SelectionDAG::getEVTAlignment(EVT VT) const { in getEVTAlignment()
986 Type *Ty = VT == MVT::iPTR ? in getEVTAlignment()
988 VT.getTypeForEVT(*getContext()); in getEVTAlignment()
1094 SDValue SelectionDAG::getFPExtendOrRound(SDValue Op, const SDLoc &DL, EVT VT) { in getFPExtendOrRound() argument
1095 return VT.bitsGT(Op.getValueType()) in getFPExtendOrRound()
1096 ? getNode(ISD::FP_EXTEND, DL, VT, Op) in getFPExtendOrRound()
1097 : getNode(ISD::FP_ROUND, DL, VT, Op, getIntPtrConstant(0, DL)); in getFPExtendOrRound()
1100 SDValue SelectionDAG::getAnyExtOrTrunc(SDValue Op, const SDLoc &DL, EVT VT) { in getAnyExtOrTrunc() argument
1101 return VT.bitsGT(Op.getValueType()) ? in getAnyExtOrTrunc()
1102 getNode(ISD::ANY_EXTEND, DL, VT, Op) : in getAnyExtOrTrunc()
1103 getNode(ISD::TRUNCATE, DL, VT, Op); in getAnyExtOrTrunc()
1106 SDValue SelectionDAG::getSExtOrTrunc(SDValue Op, const SDLoc &DL, EVT VT) { in getSExtOrTrunc() argument
1107 return VT.bitsGT(Op.getValueType()) ? in getSExtOrTrunc()
1108 getNode(ISD::SIGN_EXTEND, DL, VT, Op) : in getSExtOrTrunc()
1109 getNode(ISD::TRUNCATE, DL, VT, Op); in getSExtOrTrunc()
1112 SDValue SelectionDAG::getZExtOrTrunc(SDValue Op, const SDLoc &DL, EVT VT) { in getZExtOrTrunc() argument
1113 return VT.bitsGT(Op.getValueType()) ? in getZExtOrTrunc()
1114 getNode(ISD::ZERO_EXTEND, DL, VT, Op) : in getZExtOrTrunc()
1115 getNode(ISD::TRUNCATE, DL, VT, Op); in getZExtOrTrunc()
1118 SDValue SelectionDAG::getBoolExtOrTrunc(SDValue Op, const SDLoc &SL, EVT VT, in getBoolExtOrTrunc() argument
1120 if (VT.bitsLE(Op.getValueType())) in getBoolExtOrTrunc()
1121 return getNode(ISD::TRUNCATE, SL, VT, Op); in getBoolExtOrTrunc()
1124 return getNode(TLI->getExtendForContent(BType), SL, VT, Op); in getBoolExtOrTrunc()
1127 SDValue SelectionDAG::getZeroExtendInReg(SDValue Op, const SDLoc &DL, EVT VT) { in getZeroExtendInReg() argument
1128 assert(!VT.isVector() && in getZeroExtendInReg()
1131 if (Op.getValueType().getScalarType() == VT) return Op; in getZeroExtendInReg()
1134 VT.getSizeInBits()); in getZeroExtendInReg()
1140 SDValue SelectionDAG::getNOT(const SDLoc &DL, SDValue Val, EVT VT) { in getNOT() argument
1141 EVT EltVT = VT.getScalarType(); in getNOT()
1143 getConstant(APInt::getAllOnesValue(EltVT.getSizeInBits()), DL, VT); in getNOT()
1144 return getNode(ISD::XOR, DL, VT, Val, NegOne); in getNOT()
1147 SDValue SelectionDAG::getLogicalNOT(const SDLoc &DL, SDValue Val, EVT VT) { in getLogicalNOT() argument
1148 SDValue TrueValue = getBoolConstant(true, DL, VT, VT); in getLogicalNOT()
1149 return getNode(ISD::XOR, DL, VT, Val, TrueValue); in getLogicalNOT()
1152 SDValue SelectionDAG::getBoolConstant(bool V, const SDLoc &DL, EVT VT, in getBoolConstant() argument
1155 return getConstant(0, DL, VT); in getBoolConstant()
1160 return getConstant(1, DL, VT); in getBoolConstant()
1162 return getAllOnesConstant(DL, VT); in getBoolConstant()
1167 SDValue SelectionDAG::getConstant(uint64_t Val, const SDLoc &DL, EVT VT, in getConstant() argument
1169 EVT EltVT = VT.getScalarType(); in getConstant()
1173 return getConstant(APInt(EltVT.getSizeInBits(), Val), DL, VT, isT, isO); in getConstant()
1176 SDValue SelectionDAG::getConstant(const APInt &Val, const SDLoc &DL, EVT VT, in getConstant() argument
1178 return getConstant(*ConstantInt::get(*Context, Val), DL, VT, isT, isO); in getConstant()
1182 EVT VT, bool isT, bool isO) { in getConstant() argument
1183 assert(VT.isInteger() && "Cannot create FP integer constant!"); in getConstant()
1185 EVT EltVT = VT.getScalarType(); in getConstant()
1192 if (VT.isVector() && TLI->getTypeAction(*getContext(), EltVT) == in getConstant()
1204 else if (NewNodesMustHaveLegalTypes && VT.isVector() && in getConstant()
1210 unsigned ViaVecNumElts = VT.getSizeInBits() / ViaEltSizeInBits; in getConstant()
1216 assert(ViaVecVT.getSizeInBits() == VT.getSizeInBits()); in getConstant()
1219 for (unsigned i = 0; i < ViaVecNumElts / VT.getVectorNumElements(); ++i) { in getConstant()
1238 for (unsigned i = 0, e = VT.getVectorNumElements(); i != e; ++i) in getConstant()
1241 SDValue V = getNode(ISD::BITCAST, DL, VT, getBuildVector(ViaVecVT, DL, Ops)); in getConstant()
1255 if (!VT.isVector()) in getConstant()
1266 if (VT.isVector()) in getConstant()
1267 Result = getSplatBuildVector(VT, DL, Result); in getConstant()
1277 SDValue SelectionDAG::getConstantFP(const APFloat &V, const SDLoc &DL, EVT VT, in getConstantFP() argument
1279 return getConstantFP(*ConstantFP::get(*getContext(), V), DL, VT, isTarget); in getConstantFP()
1283 EVT VT, bool isTarget) { in getConstantFP() argument
1284 assert(VT.isFloatingPoint() && "Cannot create integer FP constant!"); in getConstantFP()
1286 EVT EltVT = VT.getScalarType(); in getConstantFP()
1298 if (!VT.isVector()) in getConstantFP()
1308 if (VT.isVector()) in getConstantFP()
1309 Result = getSplatBuildVector(VT, DL, Result); in getConstantFP()
1314 SDValue SelectionDAG::getConstantFP(double Val, const SDLoc &DL, EVT VT, in getConstantFP() argument
1316 EVT EltVT = VT.getScalarType(); in getConstantFP()
1318 return getConstantFP(APFloat((float)Val), DL, VT, isTarget); in getConstantFP()
1320 return getConstantFP(APFloat(Val), DL, VT, isTarget); in getConstantFP()
1327 return getConstantFP(APF, DL, VT, isTarget); in getConstantFP()
1333 EVT VT, int64_t Offset, bool isTargetGA, in getGlobalAddress() argument
1350 AddNodeIDNode(ID, Opc, getVTList(VT), None); in getGlobalAddress()
1359 Opc, DL.getIROrder(), DL.getDebugLoc(), GV, VT, Offset, TargetFlags); in getGlobalAddress()
1365 SDValue SelectionDAG::getFrameIndex(int FI, EVT VT, bool isTarget) { in getFrameIndex() argument
1368 AddNodeIDNode(ID, Opc, getVTList(VT), None); in getFrameIndex()
1374 auto *N = newSDNode<FrameIndexSDNode>(FI, VT, isTarget); in getFrameIndex()
1380 SDValue SelectionDAG::getJumpTable(int JTI, EVT VT, bool isTarget, in getJumpTable() argument
1386 AddNodeIDNode(ID, Opc, getVTList(VT), None); in getJumpTable()
1393 auto *N = newSDNode<JumpTableSDNode>(JTI, VT, isTarget, TargetFlags); in getJumpTable()
1399 SDValue SelectionDAG::getConstantPool(const Constant *C, EVT VT, in getConstantPool() argument
1411 AddNodeIDNode(ID, Opc, getVTList(VT), None); in getConstantPool()
1420 auto *N = newSDNode<ConstantPoolSDNode>(isTarget, C, VT, Offset, Alignment, in getConstantPool()
1427 SDValue SelectionDAG::getConstantPool(MachineConstantPoolValue *C, EVT VT, in getConstantPool() argument
1437 AddNodeIDNode(ID, Opc, getVTList(VT), None); in getConstantPool()
1446 auto *N = newSDNode<ConstantPoolSDNode>(isTarget, C, VT, Offset, Alignment, in getConstantPool()
1453 SDValue SelectionDAG::getTargetIndex(int Index, EVT VT, int64_t Offset, in getTargetIndex() argument
1456 AddNodeIDNode(ID, ISD::TargetIndex, getVTList(VT), None); in getTargetIndex()
1464 auto *N = newSDNode<TargetIndexSDNode>(Index, VT, Offset, TargetFlags); in getTargetIndex()
1484 SDValue SelectionDAG::getValueType(EVT VT) { in getValueType() argument
1485 if (VT.isSimple() && (unsigned)VT.getSimpleVT().SimpleTy >= in getValueType()
1487 ValueTypeNodes.resize(VT.getSimpleVT().SimpleTy+1); in getValueType()
1489 SDNode *&N = VT.isExtended() ? in getValueType()
1490 ExtendedValueTypeNodes[VT] : ValueTypeNodes[VT.getSimpleVT().SimpleTy]; in getValueType()
1493 N = newSDNode<VTSDNode>(VT); in getValueType()
1498 SDValue SelectionDAG::getExternalSymbol(const char *Sym, EVT VT) { in getExternalSymbol() argument
1501 N = newSDNode<ExternalSymbolSDNode>(false, Sym, 0, VT); in getExternalSymbol()
1506 SDValue SelectionDAG::getMCSymbol(MCSymbol *Sym, EVT VT) { in getMCSymbol() argument
1510 N = newSDNode<MCSymbolSDNode>(Sym, VT); in getMCSymbol()
1515 SDValue SelectionDAG::getTargetExternalSymbol(const char *Sym, EVT VT, in getTargetExternalSymbol() argument
1521 N = newSDNode<ExternalSymbolSDNode>(true, Sym, TargetFlags, VT); in getTargetExternalSymbol()
1546 SDValue SelectionDAG::getVectorShuffle(EVT VT, const SDLoc &dl, SDValue N1, in getVectorShuffle() argument
1548 assert(VT.getVectorNumElements() == Mask.size() && in getVectorShuffle()
1550 assert(VT == N1.getValueType() && VT == N2.getValueType() && in getVectorShuffle()
1555 return getUNDEF(VT); in getVectorShuffle()
1569 N2 = getUNDEF(VT); in getVectorShuffle()
1623 return getUNDEF(VT); in getVectorShuffle()
1625 N2 = getUNDEF(VT); in getVectorShuffle()
1627 N1 = getUNDEF(VT); in getVectorShuffle()
1634 return getUNDEF(VT); in getVectorShuffle()
1660 return getUNDEF(VT); in getVectorShuffle()
1663 V.getValueType().getVectorNumElements() == VT.getVectorNumElements(); in getVectorShuffle()
1685 if (BuildVT != VT) in getVectorShuffle()
1686 NewBV = getNode(ISD::BITCAST, dl, VT, NewBV); in getVectorShuffle()
1694 AddNodeIDNode(ID, ISD::VECTOR_SHUFFLE, getVTList(VT), Ops); in getVectorShuffle()
1708 auto *N = newSDNode<ShuffleVectorSDNode>(VT, dl.getIROrder(), in getVectorShuffle()
1720 EVT VT = SV.getValueType(0); in getCommutedVectorShuffle() local
1726 return getVectorShuffle(VT, SDLoc(&SV), Op1, Op0, MaskVec); in getCommutedVectorShuffle()
1729 SDValue SelectionDAG::getRegister(unsigned RegNo, EVT VT) { in getRegister() argument
1731 AddNodeIDNode(ID, ISD::Register, getVTList(VT), None); in getRegister()
1737 auto *N = newSDNode<RegisterSDNode>(RegNo, VT); in getRegister()
1781 SDValue SelectionDAG::getBlockAddress(const BlockAddress *BA, EVT VT, in getBlockAddress() argument
1788 AddNodeIDNode(ID, Opc, getVTList(VT), None); in getBlockAddress()
1796 auto *N = newSDNode<BlockAddressSDNode>(Opc, VT, BA, Offset, TargetFlags); in getBlockAddress()
1835 SDValue SelectionDAG::getBitcast(EVT VT, SDValue V) { in getBitcast() argument
1836 if (VT == V.getValueType()) in getBitcast()
1839 return getNode(ISD::BITCAST, SDLoc(V), VT, V); in getBitcast()
1842 SDValue SelectionDAG::getAddrSpaceCast(const SDLoc &dl, EVT VT, SDValue Ptr, in getAddrSpaceCast() argument
1846 AddNodeIDNode(ID, ISD::ADDRSPACECAST, getVTList(VT), Ops); in getAddrSpaceCast()
1855 VT, SrcAS, DestAS); in getAddrSpaceCast()
1877 EVT VT = Node->getValueType(0); in expandVAArg() local
1899 VT.getTypeForEVT(*getContext())), in expandVAArg()
1905 return getLoad(VT, dl, Tmp1, VAList, MachinePointerInfo()); in expandVAArg()
1922 SDValue SelectionDAG::CreateStackTemporary(EVT VT, unsigned minAlign) { in CreateStackTemporary() argument
1924 unsigned ByteSize = VT.getStoreSize(); in CreateStackTemporary()
1925 Type *Ty = VT.getTypeForEVT(*getContext()); in CreateStackTemporary()
1946 SDValue SelectionDAG::FoldSetCC(EVT VT, SDValue N1, SDValue N2, in FoldSetCC() argument
1954 case ISD::SETFALSE2: return getBoolConstant(false, dl, VT, OpVT); in FoldSetCC()
1956 case ISD::SETTRUE2: return getBoolConstant(true, dl, VT, OpVT); in FoldSetCC()
1979 case ISD::SETEQ: return getBoolConstant(C1 == C2, dl, VT, OpVT); in FoldSetCC()
1980 case ISD::SETNE: return getBoolConstant(C1 != C2, dl, VT, OpVT); in FoldSetCC()
1981 case ISD::SETULT: return getBoolConstant(C1.ult(C2), dl, VT, OpVT); in FoldSetCC()
1982 case ISD::SETUGT: return getBoolConstant(C1.ugt(C2), dl, VT, OpVT); in FoldSetCC()
1983 case ISD::SETULE: return getBoolConstant(C1.ule(C2), dl, VT, OpVT); in FoldSetCC()
1984 case ISD::SETUGE: return getBoolConstant(C1.uge(C2), dl, VT, OpVT); in FoldSetCC()
1985 case ISD::SETLT: return getBoolConstant(C1.slt(C2), dl, VT, OpVT); in FoldSetCC()
1986 case ISD::SETGT: return getBoolConstant(C1.sgt(C2), dl, VT, OpVT); in FoldSetCC()
1987 case ISD::SETLE: return getBoolConstant(C1.sle(C2), dl, VT, OpVT); in FoldSetCC()
1988 case ISD::SETGE: return getBoolConstant(C1.sge(C2), dl, VT, OpVT); in FoldSetCC()
1998 return getUNDEF(VT); in FoldSetCC()
2000 case ISD::SETOEQ: return getBoolConstant(R==APFloat::cmpEqual, dl, VT, in FoldSetCC()
2003 return getUNDEF(VT); in FoldSetCC()
2006 R==APFloat::cmpLessThan, dl, VT, in FoldSetCC()
2009 return getUNDEF(VT); in FoldSetCC()
2011 case ISD::SETOLT: return getBoolConstant(R==APFloat::cmpLessThan, dl, VT, in FoldSetCC()
2014 return getUNDEF(VT); in FoldSetCC()
2017 VT, OpVT); in FoldSetCC()
2019 return getUNDEF(VT); in FoldSetCC()
2022 R==APFloat::cmpEqual, dl, VT, in FoldSetCC()
2025 return getUNDEF(VT); in FoldSetCC()
2028 R==APFloat::cmpEqual, dl, VT, OpVT); in FoldSetCC()
2029 case ISD::SETO: return getBoolConstant(R!=APFloat::cmpUnordered, dl, VT, in FoldSetCC()
2031 case ISD::SETUO: return getBoolConstant(R==APFloat::cmpUnordered, dl, VT, in FoldSetCC()
2034 R==APFloat::cmpEqual, dl, VT, in FoldSetCC()
2036 case ISD::SETUNE: return getBoolConstant(R!=APFloat::cmpEqual, dl, VT, in FoldSetCC()
2039 R==APFloat::cmpLessThan, dl, VT, in FoldSetCC()
2042 R==APFloat::cmpUnordered, dl, VT, in FoldSetCC()
2045 VT, OpVT); in FoldSetCC()
2046 case ISD::SETUGE: return getBoolConstant(R!=APFloat::cmpLessThan, dl, VT, in FoldSetCC()
2056 return getSetCC(dl, VT, N2, N1, SwappedCond); in FoldSetCC()
2158 EVT VT = V.getValueType(); in isSplatValue() local
2159 assert(VT.isVector() && "Vector type expected"); in isSplatValue()
2161 unsigned NumElts = VT.getVectorNumElements(); in isSplatValue()
2237 EVT VT = V.getValueType(); in isSplatValue() local
2238 assert(VT.isVector() && "Vector type expected"); in isSplatValue()
2239 unsigned NumElts = VT.getVectorNumElements(); in isSplatValue()
2255 EVT VT = N.getValueType(); in isConstOrDemandedConstSplat() local
2257 unsigned NumElts = VT.getVectorNumElements(); in isConstOrDemandedConstSplat()
2264 C->getValueType(0) != VT.getScalarType()) in isConstOrDemandedConstSplat()
2287 EVT VT = Op.getValueType(); in computeKnownBits() local
2288 APInt DemandedElts = VT.isVector() in computeKnownBits()
2289 ? APInt::getAllOnesValue(VT.getVectorNumElements()) in computeKnownBits()
2806 EVT VT = LD->getMemoryVT(); in computeKnownBits() local
2807 unsigned MemBits = VT.getScalarSizeInBits(); in computeKnownBits()
2857 EVT VT = cast<VTSDNode>(Op.getOperand(1))->getVT(); in computeKnownBits() local
2858 APInt InMask = APInt::getLowBitsSet(BitWidth, VT.getSizeInBits()); in computeKnownBits()
3276 EVT VT = Op.getValueType(); in ComputeNumSignBits() local
3277 APInt DemandedElts = VT.isVector() in ComputeNumSignBits()
3278 ? APInt::getAllOnesValue(VT.getVectorNumElements()) in ComputeNumSignBits()
3285 EVT VT = Op.getValueType(); in ComputeNumSignBits() local
3286 assert((VT.isInteger() || VT.isFloatingPoint()) && "Invalid VT!"); in ComputeNumSignBits()
3287 unsigned VTBits = VT.getScalarSizeInBits(); in ComputeNumSignBits()
3383 assert(VT.isVector() && "Expected bitcast to vector"); in ComputeNumSignBits()
3521 if (TLI->getBooleanContents(VT.isVector(), false) == in ComputeNumSignBits()
3984 static SDValue FoldBUILD_VECTOR(const SDLoc &DL, EVT VT, in FoldBUILD_VECTOR() argument
3989 assert(VT.getVectorNumElements() == (unsigned)NumOps && in FoldBUILD_VECTOR()
3994 return DAG.getUNDEF(VT); in FoldBUILD_VECTOR()
4001 Ops[i].getOperand(0).getValueType() != VT || in FoldBUILD_VECTOR()
4016 static SDValue FoldCONCAT_VECTORS(const SDLoc &DL, EVT VT, in FoldCONCAT_VECTORS() argument
4026 VT.getVectorNumElements() && in FoldCONCAT_VECTORS()
4034 return DAG.getUNDEF(VT); in FoldCONCAT_VECTORS()
4039 EVT SVT = VT.getScalarType(); in FoldCONCAT_VECTORS()
4056 if (SVT.bitsGT(VT.getScalarType())) in FoldCONCAT_VECTORS()
4062 SDValue V = DAG.getBuildVector(VT, DL, Elts); in FoldCONCAT_VECTORS()
4068 SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT) { in getNode() argument
4070 AddNodeIDNode(ID, Opcode, getVTList(VT), None); in getNode()
4076 getVTList(VT)); in getNode()
4085 SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT, in getNode() argument
4097 return getConstant(Val.sextOrTrunc(VT.getSizeInBits()), DL, VT, in getNode()
4105 return getConstant(Val.zextOrTrunc(VT.getSizeInBits()), DL, VT, in getNode()
4109 APFloat apf(EVTToAPFloatSemantics(VT), in getNode()
4110 APInt::getNullValue(VT.getSizeInBits())); in getNode()
4114 return getConstantFP(apf, DL, VT); in getNode()
4117 if (VT == MVT::f16 && C->getValueType(0) == MVT::i16) in getNode()
4118 return getConstantFP(APFloat(APFloat::IEEEhalf(), Val), DL, VT); in getNode()
4119 if (VT == MVT::f32 && C->getValueType(0) == MVT::i32) in getNode()
4120 return getConstantFP(APFloat(APFloat::IEEEsingle(), Val), DL, VT); in getNode()
4121 if (VT == MVT::f64 && C->getValueType(0) == MVT::i64) in getNode()
4122 return getConstantFP(APFloat(APFloat::IEEEdouble(), Val), DL, VT); in getNode()
4123 if (VT == MVT::f128 && C->getValueType(0) == MVT::i128) in getNode()
4124 return getConstantFP(APFloat(APFloat::IEEEquad(), Val), DL, VT); in getNode()
4127 return getConstant(Val.abs(), DL, VT, C->isTargetOpcode(), in getNode()
4130 return getConstant(Val.reverseBits(), DL, VT, C->isTargetOpcode(), in getNode()
4133 return getConstant(Val.byteSwap(), DL, VT, C->isTargetOpcode(), in getNode()
4136 return getConstant(Val.countPopulation(), DL, VT, C->isTargetOpcode(), in getNode()
4140 return getConstant(Val.countLeadingZeros(), DL, VT, C->isTargetOpcode(), in getNode()
4144 return getConstant(Val.countTrailingZeros(), DL, VT, C->isTargetOpcode(), in getNode()
4153 (void)FPV.convert(EVTToAPFloatSemantics(VT), in getNode()
4155 return getConstantFP(FPV, DL, VT); in getNode()
4166 return getConstantFP(V, DL, VT); in getNode()
4169 return getConstantFP(V, DL, VT); in getNode()
4173 return getConstantFP(V, DL, VT); in getNode()
4179 return getConstantFP(V, DL, VT); in getNode()
4185 return getConstantFP(V, DL, VT); in getNode()
4192 (void)V.convert(EVTToAPFloatSemantics(VT), in getNode()
4194 return getConstantFP(V, DL, VT); in getNode()
4199 APSInt IntVal(VT.getSizeInBits(), Opcode == ISD::FP_TO_UINT); in getNode()
4205 return getConstant(IntVal, DL, VT); in getNode()
4208 if (VT == MVT::i16 && C->getValueType(0) == MVT::f16) in getNode()
4209 return getConstant((uint16_t)V.bitcastToAPInt().getZExtValue(), DL, VT); in getNode()
4210 else if (VT == MVT::i32 && C->getValueType(0) == MVT::f32) in getNode()
4211 return getConstant((uint32_t)V.bitcastToAPInt().getZExtValue(), DL, VT); in getNode()
4212 else if (VT == MVT::i64 && C->getValueType(0) == MVT::f64) in getNode()
4213 return getConstant(V.bitcastToAPInt().getZExtValue(), DL, VT); in getNode()
4221 return getConstant(V.bitcastToAPInt(), DL, VT); in getNode()
4257 if (SDValue Fold = FoldConstantVectorArithmetic(Opcode, DL, VT, Ops)) in getNode()
4273 if (SDValue V = FoldBUILD_VECTOR(DL, VT, Ops, *this)) in getNode()
4279 assert(VT.isFloatingPoint() && in getNode()
4281 if (Operand.getValueType() == VT) return Operand; // noop conversion. in getNode()
4282 assert((!VT.isVector() || in getNode()
4283 VT.getVectorNumElements() == in getNode()
4286 assert(Operand.getValueType().bitsLT(VT) && in getNode()
4289 return getUNDEF(VT); in getNode()
4292 assert(VT.isInteger() && Operand.getValueType().isInteger() && in getNode()
4294 if (Operand.getValueType() == VT) return Operand; // noop extension in getNode()
4295 assert((!VT.isVector() || in getNode()
4296 VT.getVectorNumElements() == in getNode()
4299 assert(Operand.getValueType().bitsLT(VT) && in getNode()
4302 return getNode(OpOpcode, DL, VT, Operand.getOperand(0)); in getNode()
4305 return getConstant(0, DL, VT); in getNode()
4308 assert(VT.isInteger() && Operand.getValueType().isInteger() && in getNode()
4310 if (Operand.getValueType() == VT) return Operand; // noop extension in getNode()
4311 assert((!VT.isVector() || in getNode()
4312 VT.getVectorNumElements() == in getNode()
4315 assert(Operand.getValueType().bitsLT(VT) && in getNode()
4318 return getNode(ISD::ZERO_EXTEND, DL, VT, Operand.getOperand(0)); in getNode()
4321 return getConstant(0, DL, VT); in getNode()
4324 assert(VT.isInteger() && Operand.getValueType().isInteger() && in getNode()
4326 if (Operand.getValueType() == VT) return Operand; // noop extension in getNode()
4327 assert((!VT.isVector() || in getNode()
4328 VT.getVectorNumElements() == in getNode()
4331 assert(Operand.getValueType().bitsLT(VT) && in getNode()
4337 return getNode(OpOpcode, DL, VT, Operand.getOperand(0)); in getNode()
4339 return getUNDEF(VT); in getNode()
4344 if (OpOp.getValueType() == VT) { in getNode()
4351 assert(VT.isInteger() && Operand.getValueType().isInteger() && in getNode()
4353 if (Operand.getValueType() == VT) return Operand; // noop truncate in getNode()
4354 assert((!VT.isVector() || in getNode()
4355 VT.getVectorNumElements() == in getNode()
4358 assert(Operand.getValueType().bitsGT(VT) && in getNode()
4361 return getNode(ISD::TRUNCATE, DL, VT, Operand.getOperand(0)); in getNode()
4366 .bitsLT(VT.getScalarType())) in getNode()
4367 return getNode(OpOpcode, DL, VT, Operand.getOperand(0)); in getNode()
4368 if (Operand.getOperand(0).getValueType().bitsGT(VT)) in getNode()
4369 return getNode(ISD::TRUNCATE, DL, VT, Operand.getOperand(0)); in getNode()
4373 return getUNDEF(VT); in getNode()
4378 assert(VT.isVector() && "This DAG node is restricted to vector types."); in getNode()
4379 assert(Operand.getValueType().bitsLE(VT) && in getNode()
4381 assert(VT.getVectorNumElements() < in getNode()
4386 assert(VT.isInteger() && VT == Operand.getValueType() && in getNode()
4389 return getUNDEF(VT); in getNode()
4392 assert(VT.isInteger() && VT == Operand.getValueType() && in getNode()
4394 assert((VT.getScalarSizeInBits() % 16 == 0) && in getNode()
4397 return getUNDEF(VT); in getNode()
4400 assert(VT.isInteger() && VT == Operand.getValueType() && in getNode()
4403 return getUNDEF(VT); in getNode()
4407 assert(VT.getSizeInBits() == Operand.getValueSizeInBits() && in getNode()
4409 if (VT == Operand.getValueType()) return Operand; // noop conversion. in getNode()
4411 return getNode(ISD::BITCAST, DL, VT, Operand.getOperand(0)); in getNode()
4413 return getUNDEF(VT); in getNode()
4416 assert(VT.isVector() && !Operand.getValueType().isVector() && in getNode()
4417 (VT.getVectorElementType() == Operand.getValueType() || in getNode()
4418 (VT.getVectorElementType().isInteger() && in getNode()
4420 VT.getVectorElementType().bitsLE(Operand.getValueType()))) && in getNode()
4423 return getUNDEF(VT); in getNode()
4428 Operand.getOperand(0).getValueType() == VT) in getNode()
4435 return getNode(ISD::FSUB, DL, VT, Operand.getOperand(1), in getNode()
4442 return getNode(ISD::FABS, DL, VT, Operand.getOperand(0)); in getNode()
4447 SDVTList VTs = getVTList(VT); in getNode()
4449 if (VT != MVT::Glue) { // Don't CSE flag producing nodes in getNode()
4516 EVT VT, const ConstantSDNode *Cst1, in FoldConstantArithmetic() argument
4525 return getConstant(Folded.first, DL, VT); in FoldConstantArithmetic()
4528 SDValue SelectionDAG::FoldSymbolOffset(unsigned Opcode, EVT VT, in FoldSymbolOffset() argument
4544 return getGlobalAddress(GA->getGlobal(), SDLoc(Cst2), VT, in FoldSymbolOffset()
4574 EVT VT, SDNode *Cst1, in FoldConstantArithmetic() argument
4583 return getUNDEF(VT); in FoldConstantArithmetic()
4588 SDValue Folded = FoldConstantArithmetic(Opcode, DL, VT, Scalar1, Scalar2); in FoldConstantArithmetic()
4589 assert((!Folded || !VT.isVector()) && in FoldConstantArithmetic()
4597 return FoldSymbolOffset(Opcode, VT, GA, Cst2); in FoldConstantArithmetic()
4600 return FoldSymbolOffset(Opcode, VT, GA, Cst1); in FoldConstantArithmetic()
4617 EVT SVT = VT.getScalarType(); in FoldConstantArithmetic()
4651 assert(VT.getVectorNumElements() == Outputs.size() && in FoldConstantArithmetic()
4655 Outputs.resize(VT.getVectorNumElements(), Outputs.back()); in FoldConstantArithmetic()
4658 return getBuildVector(VT, SDLoc(), Outputs); in FoldConstantArithmetic()
4663 const SDLoc &DL, EVT VT, in FoldConstantVectorArithmetic() argument
4673 return getUNDEF(VT); in FoldConstantVectorArithmetic()
4676 if (!VT.isVector()) in FoldConstantVectorArithmetic()
4679 unsigned NumElts = VT.getVectorNumElements(); in FoldConstantVectorArithmetic()
4701 EVT SVT = (Opcode == ISD::SETCC ? MVT::i1 : VT.getScalarType()); in FoldConstantVectorArithmetic()
4705 EVT LegalSVT = VT.getScalarType(); in FoldConstantVectorArithmetic()
4708 if (LegalSVT.bitsLT(VT.getScalarType())) in FoldConstantVectorArithmetic()
4753 SDValue V = getBuildVector(VT, DL, ScalarResults); in FoldConstantVectorArithmetic()
4758 SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT, in getNode() argument
4779 assert(VT == MVT::Other && N1.getValueType() == MVT::Other && in getNode()
4789 if (SDValue V = FoldBUILD_VECTOR(DL, VT, Ops, *this)) in getNode()
4796 if (SDValue V = FoldCONCAT_VECTORS(DL, VT, Ops, *this)) in getNode()
4801 assert(VT.isInteger() && "This operator does not apply to FP types!"); in getNode()
4803 N1.getValueType() == VT && "Binary operator types must match!"); in getNode()
4815 assert(VT.isInteger() && "This operator does not apply to FP types!"); in getNode()
4817 N1.getValueType() == VT && "Binary operator types must match!"); in getNode()
4838 assert(VT.isInteger() && "This operator does not apply to FP types!"); in getNode()
4840 N1.getValueType() == VT && "Binary operator types must match!"); in getNode()
4847 assert(VT.isFloatingPoint() && "This operator only applies to FP types!"); in getNode()
4849 N1.getValueType() == VT && "Binary operator types must match!"); in getNode()
4852 assert(N1.getValueType() == VT && in getNode()
4865 assert(VT == N1.getValueType() && in getNode()
4867 assert(VT.isInteger() && N2.getValueType().isInteger() && in getNode()
4869 assert((!VT.isVector() || VT == N2.getValueType()) && in getNode()
4881 if (VT == MVT::i1) in getNode()
4888 assert(VT == N1.getValueType() && "Not an inreg round!"); in getNode()
4889 assert(VT.isFloatingPoint() && EVT.isFloatingPoint() && in getNode()
4891 assert(EVT.isVector() == VT.isVector() && in getNode()
4895 EVT.getVectorNumElements() == VT.getVectorNumElements()) && in getNode()
4897 assert(EVT.bitsLE(VT) && "Not rounding down!"); in getNode()
4899 if (cast<VTSDNode>(N2)->getVT() == VT) return N1; // Not actually rounding. in getNode()
4903 assert(VT.isFloatingPoint() && in getNode()
4905 VT.bitsLE(N1.getValueType()) && in getNode()
4908 if (N1.getValueType() == VT) return N1; // noop conversion. in getNode()
4913 assert(VT == N1.getValueType() && "Not an inreg extend!"); in getNode()
4914 assert(VT.isInteger() && EVT.isInteger() && in getNode()
4919 assert(EVT.bitsLE(VT.getScalarType()) && "Not extending!"); in getNode()
4920 if (VT.getScalarType() == EVT) return N1; // noop assertion. in getNode()
4925 assert(VT == N1.getValueType() && "Not an inreg extend!"); in getNode()
4926 assert(VT.isInteger() && EVT.isInteger() && in getNode()
4928 assert(EVT.isVector() == VT.isVector() && in getNode()
4932 EVT.getVectorNumElements() == VT.getVectorNumElements()) && in getNode()
4934 assert(EVT.bitsLE(VT) && "Not extending!"); in getNode()
4935 if (EVT == VT) return N1; // Not actually extending in getNode()
4946 return SignExtendInReg(Val, VT); in getNode()
4951 for (int i = 0, e = VT.getVectorNumElements(); i != e; ++i) { in getNode()
4961 return getBuildVector(VT, DL, Ops); in getNode()
4966 assert(VT.getSizeInBits() >= N1.getValueType().getScalarSizeInBits() && in getNode()
4972 return getUNDEF(VT); in getNode()
4976 return getUNDEF(VT); in getNode()
4985 return getNode(ISD::EXTRACT_VECTOR_ELT, DL, VT, in getNode()
4996 if (VT != Elt.getValueType()) in getNode()
5000 Elt = getAnyExtOrTrunc(Elt, DL, VT); in getNode()
5016 if (VT == N1.getOperand(1).getValueType()) in getNode()
5019 return getSExtOrTrunc(N1.getOperand(1), DL, VT); in getNode()
5022 return getNode(ISD::EXTRACT_VECTOR_ELT, DL, VT, N1.getOperand(0), N2); in getNode()
5031 return getNode(ISD::EXTRACT_VECTOR_ELT, DL, VT, N1.getOperand(0), in getNode()
5037 assert(!N1.getValueType().isVector() && !VT.isVector() && in getNode()
5038 (N1.getValueType().isInteger() == VT.isInteger()) && in getNode()
5039 N1.getValueType() != VT && in getNode()
5050 unsigned ElementSize = VT.getSizeInBits(); in getNode()
5053 return getConstant(ShiftedVal.trunc(ElementSize), DL, VT); in getNode()
5057 if (VT.isSimple() && N1.getValueType().isSimple()) { in getNode()
5058 assert(VT.isVector() && N1.getValueType().isVector() && in getNode()
5060 assert(VT.getVectorElementType() == in getNode()
5063 assert(VT.getSimpleVT() <= N1.getSimpleValueType() && in getNode()
5067 assert((VT.getVectorNumElements() + N2C->getZExtValue() in getNode()
5073 if (VT.getSimpleVT() == N1.getSimpleValueType()) in getNode()
5078 return getUNDEF(VT); in getNode()
5084 VT == N1.getOperand(0).getValueType()) { in getNode()
5085 unsigned Factor = VT.getVectorNumElements(); in getNode()
5092 VT == N1.getOperand(1).getValueType()) in getNode()
5100 FoldConstantArithmetic(Opcode, DL, VT, N1.getNode(), N2.getNode())) in getNode()
5113 return getConstantFP(V1, DL, VT); in getNode()
5118 return getConstantFP(V1, DL, VT); in getNode()
5123 return getConstantFP(V1, DL, VT); in getNode()
5129 return getConstantFP(V1, DL, VT); in getNode()
5136 return getConstantFP(V1, DL, VT); in getNode()
5141 return getConstantFP(V1, DL, VT); in getNode()
5151 (void)V.convert(EVTToAPFloatSemantics(VT), in getNode()
5153 return getConstantFP(V, DL, VT); in getNode()
5166 return getUNDEF(VT); in getNode()
5168 return getConstantFP(APFloat::getNaN(EVTToAPFloatSemantics(VT)), DL, VT); in getNode()
5180 return getUNDEF(VT); // fold op(undef, arg2) -> undef in getNode()
5187 return getConstant(0, DL, VT); // fold op(undef, arg2) -> 0 in getNode()
5199 return getConstant(0, DL, VT); in getNode()
5207 return getUNDEF(VT); // fold op(arg1, undef) -> undef in getNode()
5212 return getConstant(0, DL, VT); // fold op(arg1, undef) -> 0 in getNode()
5216 return getAllOnesConstant(DL, VT); in getNode()
5222 SDVTList VTs = getVTList(VT); in getNode()
5224 if (VT != MVT::Glue) { in getNode()
5248 SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT, in getNode() argument
5254 assert(VT.isFloatingPoint() && "This operator only applies to FP types!"); in getNode()
5255 assert(N1.getValueType() == VT && N2.getValueType() == VT && in getNode()
5256 N3.getValueType() == VT && "FMA types must match!"); in getNode()
5267 return getConstantFP(V1, DL, VT); in getNode()
5274 if (SDValue V = FoldBUILD_VECTOR(DL, VT, Ops, *this)) in getNode()
5281 if (SDValue V = FoldCONCAT_VECTORS(DL, VT, Ops, *this)) in getNode()
5286 assert(VT.isInteger() && "SETCC result type must be an integer!"); in getNode()
5289 assert(VT.isVector() == N1.getValueType().isVector() && in getNode()
5291 assert((!VT.isVector() || in getNode()
5292 VT.getVectorNumElements() == N1.getValueType().getVectorNumElements()) && in getNode()
5295 if (SDValue V = FoldSetCC(VT, N1, N2, cast<CondCodeSDNode>(N3)->get(), DL)) in getNode()
5299 if (SDValue V = FoldConstantVectorArithmetic(Opcode, DL, VT, Ops)) { in getNode()
5316 return getUNDEF(VT); in getNode()
5321 if (VT.isSimple() && N1.getValueType().isSimple() in getNode()
5323 assert(VT.isVector() && N1.getValueType().isVector() && in getNode()
5326 assert(VT == N1.getValueType() && in getNode()
5333 <= VT.getVectorNumElements()) in getNode()
5338 if (VT.getSimpleVT() == N2.getSimpleValueType()) in getNode()
5345 if (N1.getValueType() == VT) in getNode()
5352 SDVTList VTs = getVTList(VT); in getNode()
5354 if (VT != MVT::Glue) { in getNode()
5378 SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT, in getNode() argument
5381 return getNode(Opcode, DL, VT, Ops); in getNode()
5384 SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT, in getNode() argument
5388 return getNode(Opcode, DL, VT, Ops); in getNode()
5415 static SDValue getMemsetValue(SDValue Value, EVT VT, SelectionDAG &DAG, in getMemsetValue() argument
5419 unsigned NumBits = VT.getScalarSizeInBits(); in getMemsetValue()
5423 if (VT.isInteger()) { in getMemsetValue()
5424 bool IsOpaque = VT.getSizeInBits() > 64 || in getMemsetValue()
5426 return DAG.getConstant(Val, dl, VT, false, IsOpaque); in getMemsetValue()
5428 return DAG.getConstantFP(APFloat(DAG.EVTToAPFloatSemantics(VT), Val), dl, in getMemsetValue()
5429 VT); in getMemsetValue()
5433 EVT IntVT = VT.getScalarType(); in getMemsetValue()
5446 if (VT != Value.getValueType() && !VT.isInteger()) in getMemsetValue()
5447 Value = DAG.getBitcast(VT.getScalarType(), Value); in getMemsetValue()
5448 if (VT != Value.getValueType()) in getMemsetValue()
5449 Value = DAG.getSplatBuildVector(VT, dl, Value); in getMemsetValue()
5457 static SDValue getMemsetStringVal(EVT VT, const SDLoc &dl, SelectionDAG &DAG, in getMemsetStringVal() argument
5462 if (VT.isInteger()) in getMemsetStringVal()
5463 return DAG.getConstant(0, dl, VT); in getMemsetStringVal()
5464 else if (VT == MVT::f32 || VT == MVT::f64 || VT == MVT::f128) in getMemsetStringVal()
5465 return DAG.getConstantFP(0.0, dl, VT); in getMemsetStringVal()
5466 else if (VT.isVector()) { in getMemsetStringVal()
5467 unsigned NumElts = VT.getVectorNumElements(); in getMemsetStringVal()
5468 MVT EltVT = (VT.getVectorElementType() == MVT::f32) ? MVT::i32 : MVT::i64; in getMemsetStringVal()
5469 return DAG.getNode(ISD::BITCAST, dl, VT, in getMemsetStringVal()
5477 assert(!VT.isVector() && "Can't handle vector type here!"); in getMemsetStringVal()
5478 unsigned NumVTBits = VT.getSizeInBits(); in getMemsetStringVal()
5493 Type *Ty = VT.getTypeForEVT(*DAG.getContext()); in getMemsetStringVal()
5495 return DAG.getConstant(Val, dl, VT); in getMemsetStringVal()
5501 EVT VT = Base.getValueType(); in getMemBasePlusOffset() local
5502 return getNode(ISD::ADD, DL, VT, Base, getConstant(Offset, DL, VT)); in getMemBasePlusOffset()
5547 EVT VT = TLI.getOptimalMemOpType(Size, DstAlign, SrcAlign, in FindOptimalMemOpLowering() local
5551 if (VT == MVT::Other) { in FindOptimalMemOpLowering()
5555 VT = MVT::i64; in FindOptimalMemOpLowering()
5556 while (DstAlign && DstAlign < VT.getSizeInBits() / 8 && in FindOptimalMemOpLowering()
5557 !TLI.allowsMisalignedMemoryAccesses(VT, DstAS, DstAlign)) in FindOptimalMemOpLowering()
5558 VT = (MVT::SimpleValueType)(VT.getSimpleVT().SimpleTy - 1); in FindOptimalMemOpLowering()
5559 assert(VT.isInteger()); in FindOptimalMemOpLowering()
5569 if (VT.bitsGT(LVT)) in FindOptimalMemOpLowering()
5570 VT = LVT; in FindOptimalMemOpLowering()
5575 unsigned VTSize = VT.getSizeInBits() / 8; in FindOptimalMemOpLowering()
5578 EVT NewVT = VT; in FindOptimalMemOpLowering()
5582 if (VT.isVector() || VT.isFloatingPoint()) { in FindOptimalMemOpLowering()
5583 NewVT = (VT.getSizeInBits() > 64) ? MVT::i64 : MVT::i32; in FindOptimalMemOpLowering()
5609 TLI.allowsMisalignedMemoryAccesses(VT, DstAS, DstAlign, &Fast) && in FindOptimalMemOpLowering()
5613 VT = NewVT; in FindOptimalMemOpLowering()
5621 MemOps.push_back(VT); in FindOptimalMemOpLowering()
5731 EVT VT = MemOps[i]; in getMemcpyLoadsAndStores() local
5732 unsigned VTSize = VT.getSizeInBits() / 8; in getMemcpyLoadsAndStores()
5744 (isZeroConstant || (VT.isInteger() && !VT.isVector()))) { in getMemcpyLoadsAndStores()
5760 Value = getMemsetStringVal(VT, dl, DAG, TLI, SubSlice); in getMemcpyLoadsAndStores()
5776 EVT NVT = TLI.getTypeToTransformTo(C, VT); in getMemcpyLoadsAndStores()
5777 assert(NVT.bitsGE(VT)); in getMemcpyLoadsAndStores()
5787 SrcPtrInfo.getWithOffset(SrcOff), VT, in getMemcpyLoadsAndStores()
5793 DstPtrInfo.getWithOffset(DstOff), VT, Align, MMOFlags); in getMemcpyLoadsAndStores()
5902 EVT VT = MemOps[i]; in getMemmoveLoadsAndStores() local
5903 unsigned VTSize = VT.getSizeInBits() / 8; in getMemmoveLoadsAndStores()
5913 DAG.getLoad(VT, dl, Chain, DAG.getMemBasePlusOffset(Src, SrcOff, dl), in getMemmoveLoadsAndStores()
5922 EVT VT = MemOps[i]; in getMemmoveLoadsAndStores() local
5923 unsigned VTSize = VT.getSizeInBits() / 8; in getMemmoveLoadsAndStores()
6005 EVT VT = MemOps[i]; in getMemsetStores() local
6006 unsigned VTSize = VT.getSizeInBits() / 8; in getMemsetStores()
6017 if (VT.bitsLT(LargestVT)) { in getMemsetStores()
6018 if (!LargestVT.isVector() && !VT.isVector() && in getMemsetStores()
6019 TLI.isTruncateFree(LargestVT, VT)) in getMemsetStores()
6020 Value = DAG.getNode(ISD::TRUNCATE, dl, VT, MemSetValue); in getMemsetStores()
6022 Value = getMemsetValue(Src, VT, DAG, dl); in getMemsetStores()
6024 assert(Value.getValueType() == VT && "Value with wrong type."); in getMemsetStores()
6030 DstOff += VT.getSizeInBits() / 8; in getMemsetStores()
6472 EVT VT = Val.getValueType(); in getAtomic() local
6475 getVTList(VT, MVT::Other); in getAtomic()
6481 EVT VT, SDValue Chain, SDValue Ptr, in getAtomic() argument
6485 SDVTList VTs = getVTList(VT, MVT::Other); in getAtomic()
6600 EVT VT, const SDLoc &dl, SDValue Chain, in getLoad() argument
6621 return getLoad(AM, ExtType, VT, dl, Chain, Ptr, Offset, MemVT, MMO); in getLoad()
6625 EVT VT, const SDLoc &dl, SDValue Chain, in getLoad() argument
6628 if (VT == MemVT) { in getLoad()
6631 assert(VT == MemVT && "Non-extending load from different memory type!"); in getLoad()
6634 assert(MemVT.getScalarType().bitsLT(VT.getScalarType()) && in getLoad()
6636 assert(VT.isInteger() == MemVT.isInteger() && in getLoad()
6638 assert(VT.isVector() == MemVT.isVector() && in getLoad()
6640 assert((!VT.isVector() || in getLoad()
6641 VT.getVectorNumElements() == MemVT.getVectorNumElements()) && in getLoad()
6649 getVTList(VT, Ptr.getValueType(), MVT::Other) : getVTList(VT, MVT::Other); in getLoad()
6673 SDValue SelectionDAG::getLoad(EVT VT, const SDLoc &dl, SDValue Chain, in getLoad() argument
6679 return getLoad(ISD::UNINDEXED, ISD::NON_EXTLOAD, VT, dl, Chain, Ptr, Undef, in getLoad()
6680 PtrInfo, VT, Alignment, MMOFlags, AAInfo, Ranges); in getLoad()
6683 SDValue SelectionDAG::getLoad(EVT VT, const SDLoc &dl, SDValue Chain, in getLoad() argument
6686 return getLoad(ISD::UNINDEXED, ISD::NON_EXTLOAD, VT, dl, Chain, Ptr, Undef, in getLoad()
6687 VT, MMO); in getLoad()
6691 EVT VT, SDValue Chain, SDValue Ptr, in getExtLoad() argument
6697 return getLoad(ISD::UNINDEXED, ExtType, VT, dl, Chain, Ptr, Undef, PtrInfo, in getExtLoad()
6702 EVT VT, SDValue Chain, SDValue Ptr, EVT MemVT, in getExtLoad() argument
6705 return getLoad(ISD::UNINDEXED, ExtType, VT, dl, Chain, Ptr, Undef, in getExtLoad()
6749 EVT VT = Val.getValueType(); in getStore() local
6755 ID.AddInteger(VT.getRawBits()); in getStore()
6757 dl.getIROrder(), VTs, ISD::UNINDEXED, false, VT, MMO)); in getStore()
6765 ISD::UNINDEXED, false, VT, MMO); in getStore()
6800 EVT VT = Val.getValueType(); in getTruncStore() local
6804 if (VT == SVT) in getTruncStore()
6807 assert(SVT.getScalarType().bitsLT(VT.getScalarType()) && in getTruncStore()
6809 assert(VT.isInteger() == SVT.isInteger() && in getTruncStore()
6811 assert(VT.isVector() == SVT.isVector() && in getTruncStore()
6813 assert((!VT.isVector() || in getTruncStore()
6814 VT.getVectorNumElements() == SVT.getVectorNumElements()) && in getTruncStore()
6870 SDValue SelectionDAG::getMaskedLoad(EVT VT, const SDLoc &dl, SDValue Chain, in getMaskedLoad() argument
6874 SDVTList VTs = getVTList(VT, MVT::Other); in getMaskedLoad()
6878 ID.AddInteger(VT.getRawBits()); in getMaskedLoad()
6904 EVT VT = Val.getValueType(); in getMaskedStore() local
6909 ID.AddInteger(VT.getRawBits()); in getMaskedStore()
6929 SDValue SelectionDAG::getMaskedGather(SDVTList VTs, EVT VT, const SDLoc &dl, in getMaskedGather() argument
6936 ID.AddInteger(VT.getRawBits()); in getMaskedGather()
6938 dl.getIROrder(), VTs, VT, MMO)); in getMaskedGather()
6947 VTs, VT, MMO); in getMaskedGather()
6969 SDValue SelectionDAG::getMaskedScatter(SDVTList VTs, EVT VT, const SDLoc &dl, in getMaskedScatter() argument
6976 ID.AddInteger(VT.getRawBits()); in getMaskedScatter()
6978 dl.getIROrder(), VTs, VT, MMO)); in getMaskedScatter()
6986 VTs, VT, MMO); in getMaskedScatter()
7060 SDValue SelectionDAG::getVAArg(EVT VT, const SDLoc &dl, SDValue Chain, in getVAArg() argument
7063 return getNode(ISD::VAARG, dl, getVTList(VT, MVT::Other), Ops); in getVAArg()
7066 SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT, in getNode() argument
7069 case 0: return getNode(Opcode, DL, VT); in getNode()
7070 case 1: return getNode(Opcode, DL, VT, static_cast<const SDValue>(Ops[0])); in getNode()
7071 case 2: return getNode(Opcode, DL, VT, Ops[0], Ops[1]); in getNode()
7072 case 3: return getNode(Opcode, DL, VT, Ops[0], Ops[1], Ops[2]); in getNode()
7079 return getNode(Opcode, DL, VT, NewOps); in getNode()
7082 SDValue SelectionDAG::getNode(unsigned Opcode, const SDLoc &DL, EVT VT, in getNode() argument
7086 case 0: return getNode(Opcode, DL, VT); in getNode()
7087 case 1: return getNode(Opcode, DL, VT, Ops[0], Flags); in getNode()
7088 case 2: return getNode(Opcode, DL, VT, Ops[0], Ops[1], Flags); in getNode()
7089 case 3: return getNode(Opcode, DL, VT, Ops[0], Ops[1], Ops[2], Flags); in getNode()
7097 if (SDValue V = FoldBUILD_VECTOR(DL, VT, Ops, *this)) in getNode()
7102 if (SDValue V = FoldCONCAT_VECTORS(DL, VT, Ops, *this)) in getNode()
7111 assert(Ops[2].getValueType() == VT && in getNode()
7123 SDVTList VTs = getVTList(VT); in getNode()
7125 if (VT != MVT::Glue) { in getNode()
7168 return getNode(Opcode, DL, VT, N1, N2, N3.getOperand(0)); in getNode()
7173 unsigned NumBits = VT.getScalarSizeInBits()*2; in getNode()
7175 return getNode(Opcode, DL, VT, N1, N2, N3.getOperand(0)); in getNode()
7239 SDVTList SelectionDAG::getVTList(EVT VT) { in getVTList() argument
7240 return makeVTList(SDNode::getValueTypeList(VT), 1); in getVTList()
7470 EVT VT) { in SelectNodeTo() argument
7471 SDVTList VTs = getVTList(VT); in SelectNodeTo()
7476 EVT VT, SDValue Op1) { in SelectNodeTo() argument
7477 SDVTList VTs = getVTList(VT); in SelectNodeTo()
7483 EVT VT, SDValue Op1, in SelectNodeTo() argument
7485 SDVTList VTs = getVTList(VT); in SelectNodeTo()
7491 EVT VT, SDValue Op1, in SelectNodeTo() argument
7493 SDVTList VTs = getVTList(VT); in SelectNodeTo()
7499 EVT VT, ArrayRef<SDValue> Ops) { in SelectNodeTo() argument
7500 SDVTList VTs = getVTList(VT); in SelectNodeTo()
7705 EVT VT) { in getMachineNode() argument
7706 SDVTList VTs = getVTList(VT); in getMachineNode()
7711 EVT VT, SDValue Op1) { in getMachineNode() argument
7712 SDVTList VTs = getVTList(VT); in getMachineNode()
7718 EVT VT, SDValue Op1, SDValue Op2) { in getMachineNode() argument
7719 SDVTList VTs = getVTList(VT); in getMachineNode()
7725 EVT VT, SDValue Op1, SDValue Op2, in getMachineNode() argument
7727 SDVTList VTs = getVTList(VT); in getMachineNode()
7733 EVT VT, ArrayRef<SDValue> Ops) { in getMachineNode() argument
7734 SDVTList VTs = getVTList(VT); in getMachineNode()
7821 SDValue SelectionDAG::getTargetExtractSubreg(int SRIdx, const SDLoc &DL, EVT VT, in getTargetExtractSubreg() argument
7825 VT, Operand, SRIdxVal); in getTargetExtractSubreg()
7831 SDValue SelectionDAG::getTargetInsertSubreg(int SRIdx, const SDLoc &DL, EVT VT, in getTargetInsertSubreg() argument
7835 VT, Operand, Subreg, SRIdxVal); in getTargetInsertSubreg()
8651 const GlobalValue *GA, EVT VT, in GlobalAddressSDNode() argument
8653 : SDNode(Opc, Order, DL, getSDVTList(VT)), Offset(o), TargetFlags(TF) { in GlobalAddressSDNode()
8658 EVT VT, unsigned SrcAS, in AddrSpaceCastSDNode() argument
8660 : SDNode(ISD::ADDRSPACECAST, Order, dl, getSDVTList(VT)), in AddrSpaceCastSDNode()
8703 const EVT *SDNode::getValueTypeList(EVT VT) { in getValueTypeList() argument
8704 if (VT.isExtended()) { in getValueTypeList()
8706 return &(*EVTs->insert(VT).first); in getValueTypeList()
8708 assert(VT.getSimpleVT() < MVT::LAST_VALUETYPE && in getValueTypeList()
8710 return &SimpleVTArray->VTs[VT.getSimpleVT().SimpleTy]; in getValueTypeList()
8910 EVT VT = N->getValueType(0); in UnrollVectorOp() local
8911 unsigned NE = VT.getVectorNumElements(); in UnrollVectorOp()
8912 EVT EltVT = VT.getVectorElementType(); in UnrollVectorOp()
8986 EVT VT = LD->getValueType(0); in areNonVolatileConsecutiveLoads() local
8987 if (VT.getSizeInBits() / 8 != Bytes) in areNonVolatileConsecutiveLoads()
9040 std::pair<EVT, EVT> SelectionDAG::GetSplitDestVTs(const EVT &VT) const { in GetSplitDestVTs()
9043 if (!VT.isVector()) in GetSplitDestVTs()
9044 LoVT = HiVT = TLI->getTypeToTransformTo(*getContext(), VT); in GetSplitDestVTs()
9046 LoVT = HiVT = VT.getHalfNumVectorElementsVT(*getContext()); in GetSplitDestVTs()
9071 EVT VT = Op.getValueType(); in ExtractVectorElements() local
9073 Count = VT.getVectorNumElements(); in ExtractVectorElements()
9075 EVT EltVT = VT.getVectorElementType(); in ExtractVectorElements()
9100 EVT VT = getValueType(0); in isConstantSplat() local
9101 assert(VT.isVector() && "Expected a vector type"); in isConstantSplat()
9102 unsigned VecWidth = VT.getSizeInBits(); in isConstantSplat()
9117 unsigned EltWidth = VT.getScalarSizeInBits(); in isConstantSplat()
9225 bool ShuffleVectorSDNode::isSplatMask(const int *Mask, EVT VT) { in isSplatMask() argument
9228 for (i = 0, e = VT.getVectorNumElements(); i != e && Mask[i] < 0; ++i) in isSplatMask()