• Home
  • Raw
  • Download

Lines Matching refs:DestTy

100 static Constant *FoldBitCast(Constant *V, Type *DestTy) {  in FoldBitCast()  argument
102 if (SrcTy == DestTy) in FoldBitCast()
108 if (PointerType *DPTy = dyn_cast<PointerType>(DestTy)) in FoldBitCast()
138 if (VectorType *DestPTy = dyn_cast<VectorType>(DestTy)) { in FoldBitCast()
145 return Constant::getNullValue(DestTy); in FoldBitCast()
161 return ConstantPointerNull::get(cast<PointerType>(DestTy)); in FoldBitCast()
165 if (DestTy->isIntegerTy()) in FoldBitCast()
170 if (DestTy->isFloatingPointTy()) in FoldBitCast()
171 return ConstantFP::get(DestTy->getContext(), in FoldBitCast()
172 APFloat(DestTy->getFltSemantics(), in FoldBitCast()
337 static Constant *getFoldedSizeOf(Type *Ty, Type *DestTy, in getFoldedSizeOf() argument
340 Constant *N = ConstantInt::get(DestTy, ATy->getNumElements()); in getFoldedSizeOf()
341 Constant *E = getFoldedSizeOf(ATy->getElementType(), DestTy, true); in getFoldedSizeOf()
350 return ConstantExpr::getNullValue(DestTy); in getFoldedSizeOf()
353 getFoldedSizeOf(STy->getElementType(0), DestTy, true); in getFoldedSizeOf()
357 getFoldedSizeOf(STy->getElementType(i), DestTy, true)) { in getFoldedSizeOf()
362 Constant *N = ConstantInt::get(DestTy, NumElems); in getFoldedSizeOf()
374 DestTy, true); in getFoldedSizeOf()
384 DestTy, false), in getFoldedSizeOf()
385 C, DestTy); in getFoldedSizeOf()
394 static Constant *getFoldedAlignOf(Type *Ty, Type *DestTy, in getFoldedAlignOf() argument
401 DestTy, in getFoldedAlignOf()
403 C, DestTy); in getFoldedAlignOf()
410 return ConstantInt::get(DestTy, 1); in getFoldedAlignOf()
418 return ConstantInt::get(DestTy, 1); in getFoldedAlignOf()
421 getFoldedAlignOf(STy->getElementType(0), DestTy, true); in getFoldedAlignOf()
424 if (MemberAlign != getFoldedAlignOf(STy->getElementType(i), DestTy, true)) { in getFoldedAlignOf()
440 DestTy, true); in getFoldedAlignOf()
450 DestTy, false), in getFoldedAlignOf()
451 C, DestTy); in getFoldedAlignOf()
461 Type *DestTy, in getFoldedOffsetOf() argument
465 DestTy, false), in getFoldedOffsetOf()
466 FieldNo, DestTy); in getFoldedOffsetOf()
467 Constant *E = getFoldedSizeOf(ATy->getElementType(), DestTy, true); in getFoldedOffsetOf()
479 getFoldedSizeOf(STy->getElementType(0), DestTy, true); in getFoldedOffsetOf()
483 getFoldedSizeOf(STy->getElementType(i), DestTy, true)) { in getFoldedOffsetOf()
490 DestTy, in getFoldedOffsetOf()
492 FieldNo, DestTy); in getFoldedOffsetOf()
505 DestTy, false), in getFoldedOffsetOf()
506 C, DestTy); in getFoldedOffsetOf()
511 Type *DestTy) { in ConstantFoldCastInstruction() argument
518 return Constant::getNullValue(DestTy); in ConstantFoldCastInstruction()
519 return UndefValue::get(DestTy); in ConstantFoldCastInstruction()
522 if (V->isNullValue() && !DestTy->isX86_MMXTy()) in ConstantFoldCastInstruction()
523 return Constant::getNullValue(DestTy); in ConstantFoldCastInstruction()
530 if (unsigned newOpc = foldConstantCastPair(opc, CE, DestTy)) in ConstantFoldCastInstruction()
531 return ConstantExpr::getCast(newOpc, CE->getOperand(0), DestTy); in ConstantFoldCastInstruction()
543 return ConstantExpr::getPointerCast(CE->getOperand(0), DestTy); in ConstantFoldCastInstruction()
551 DestTy->isVectorTy() && in ConstantFoldCastInstruction()
552 DestTy->getVectorNumElements() == V->getType()->getVectorNumElements()) { in ConstantFoldCastInstruction()
554 VectorType *DestVecTy = cast<VectorType>(DestTy); in ConstantFoldCastInstruction()
575 Val.convert(DestTy->isHalfTy() ? APFloat::IEEEhalf : in ConstantFoldCastInstruction()
576 DestTy->isFloatTy() ? APFloat::IEEEsingle : in ConstantFoldCastInstruction()
577 DestTy->isDoubleTy() ? APFloat::IEEEdouble : in ConstantFoldCastInstruction()
578 DestTy->isX86_FP80Ty() ? APFloat::x87DoubleExtended : in ConstantFoldCastInstruction()
579 DestTy->isFP128Ty() ? APFloat::IEEEquad : in ConstantFoldCastInstruction()
580 DestTy->isPPC_FP128Ty() ? APFloat::PPCDoubleDouble : in ConstantFoldCastInstruction()
592 uint32_t DestBitWidth = cast<IntegerType>(DestTy)->getBitWidth(); in ConstantFoldCastInstruction()
601 return ConstantPointerNull::get(cast<PointerType>(DestTy)); in ConstantFoldCastInstruction()
606 return ConstantInt::get(DestTy, 0); in ConstantFoldCastInstruction()
619 if (Constant *C = getFoldedSizeOf(Ty, DestTy, !isOne)) { in ConstantFoldCastInstruction()
621 DestTy, false), in ConstantFoldCastInstruction()
622 Idx, DestTy); in ConstantFoldCastInstruction()
634 return getFoldedAlignOf(STy->getElementType(1), DestTy, false); in ConstantFoldCastInstruction()
640 DestTy, false)) in ConstantFoldCastInstruction()
651 APFloat apf(DestTy->getFltSemantics(), in ConstantFoldCastInstruction()
652 APInt::getNullValue(DestTy->getPrimitiveSizeInBits())); in ConstantFoldCastInstruction()
661 uint32_t BitWidth = cast<IntegerType>(DestTy)->getBitWidth(); in ConstantFoldCastInstruction()
668 uint32_t BitWidth = cast<IntegerType>(DestTy)->getBitWidth(); in ConstantFoldCastInstruction()
674 uint32_t DestBitWidth = cast<IntegerType>(DestTy)->getBitWidth(); in ConstantFoldCastInstruction()
691 return FoldBitCast(V, DestTy); in ConstantFoldCastInstruction()