Lines Matching defs:DestTy
70 static Constant *FoldBitCast(Constant *V, Type *DestTy) {
72 if (SrcTy == DestTy)
77 if (VectorType *DestPTy = dyn_cast<VectorType>(DestTy)) {
79 return Constant::getAllOnesValue(DestTy);
92 if (DestTy->isFloatingPointTy() && !DestTy->isPPC_FP128Ty())
93 return ConstantFP::get(DestTy->getContext(),
94 APFloat(DestTy->getFltSemantics(),
113 if (!DestTy->isIntegerTy())
124 Type *DestTy) {
126 ? ConstantExpr::getCast(opc, V, DestTy)
127 : ConstantFoldCastInstruction(opc, V, DestTy);
131 Type *DestTy) {
133 return PoisonValue::get(DestTy);
141 return Constant::getNullValue(DestTy);
142 return UndefValue::get(DestTy);
145 if (V->isNullValue() && !DestTy->isX86_MMXTy() && !DestTy->isX86_AMXTy() &&
147 return Constant::getNullValue(DestTy);
154 if (unsigned newOpc = foldConstantCastPair(opc, CE, DestTy))
155 return foldMaybeUndesirableCast(newOpc, CE->getOperand(0), DestTy);
163 DestTy->isVectorTy() &&
164 cast<FixedVectorType>(DestTy)->getNumElements() ==
166 VectorType *DestVecTy = cast<VectorType>(DestTy);
174 cast<VectorType>(DestTy)->getElementCount(), Res);
200 Val.convert(DestTy->getFltSemantics(), APFloat::rmNearestTiesToEven,
210 uint32_t DestBitWidth = cast<IntegerType>(DestTy)->getBitWidth();
216 return PoisonValue::get(DestTy);
225 APFloat apf(DestTy->getFltSemantics(),
226 APInt::getZero(DestTy->getPrimitiveSizeInBits()));
234 uint32_t BitWidth = cast<IntegerType>(DestTy)->getBitWidth();
241 uint32_t BitWidth = cast<IntegerType>(DestTy)->getBitWidth();
250 uint32_t DestBitWidth = cast<IntegerType>(DestTy)->getBitWidth();
259 return FoldBitCast(V, DestTy);