Home | History | Annotate | Download | only in IR

Lines Matching defs:SrcTy

2064   Type* SrcTy = getOperand(0)->getType();
2066 if (SrcTy == DstTy)
2070 if (SrcTy->isPointerTy())
2084 Type *SrcTy,
2106 SrcTy->getScalarSizeInBits();
2118 /// * %F = firstOpcode SrcTy %x to MidTy
2121 /// * %Replacement = resultOpcode %SrcTy %x to DstTy
2125 Type *SrcTy, Type *MidTy, Type *DstTy, Type *SrcIntPtrTy, Type *MidIntPtrTy,
2182 bool chainedBitcast = (SrcTy == DstTy && isFirstBitcast && isSecondBitcast);
2185 if ((isFirstBitcast && isa<VectorType>(SrcTy) != isa<VectorType>(MidTy)) ||
2206 if (!SrcTy->isVectorTy() && DstTy->isIntegerTy())
2216 // no-op cast in first op implies secondOp as long as the SrcTy
2218 if (SrcTy->isIntegerTy())
2222 // no-op cast in first op implies secondOp as long as the SrcTy
2224 if (SrcTy->isFloatingPointTy())
2238 // ext, trunc -> bitcast, if the SrcTy and DstTy are same size
2239 // ext, trunc -> ext, if sizeof(SrcTy) < sizeof(DstTy)
2240 // ext, trunc -> trunc, if sizeof(SrcTy) > sizeof(DstTy)
2241 unsigned SrcSize = SrcTy->getScalarSizeInBits();
2254 if (SrcTy == DstTy)
2260 if (SrcTy->isPointerTy() && MidTy->isPointerTy())
2273 unsigned SrcSize = SrcTy->getScalarSizeInBits();
2459 bool CastInst::isCastable(Type *SrcTy, Type *DestTy) {
2460 if (!SrcTy->isFirstClassType() || !DestTy->isFirstClassType())
2463 if (SrcTy == DestTy)
2466 if (VectorType *SrcVecTy = dyn_cast<VectorType>(SrcTy))
2470 SrcTy = SrcVecTy->getElementType();
2475 unsigned SrcBits = SrcTy->getPrimitiveSizeInBits(); // 0 for ptr
2480 if (SrcTy->isIntegerTy()) { // Casting from integral
2482 } else if (SrcTy->isFloatingPointTy()) { // Casting from floating pt
2484 } else if (SrcTy->isVectorTy()) { // Casting from vector
2487 return SrcTy->isPointerTy();
2490 if (SrcTy->isIntegerTy()) { // Casting from integral
2492 } else if (SrcTy->isFloatingPointTy()) { // Casting from floating pt
2494 } else if (SrcTy->isVectorTy()) { // Casting from vector
2502 if (SrcTy->isPointerTy()) { // Casting from pointer
2504 } else if (SrcTy->isIntegerTy()) { // Casting from integral
2510 if (SrcTy->isVectorTy()) {
2530 Type *SrcTy = Src->getType();
2532 assert(SrcTy->isFirstClassType() && DestTy->isFirstClassType() &&
2535 if (SrcTy == DestTy)
2538 if (VectorType *SrcVecTy = dyn_cast<VectorType>(SrcTy))
2543 SrcTy = SrcVecTy->getElementType();
2548 unsigned SrcBits = SrcTy->getPrimitiveSizeInBits(); // 0 for ptr
2553 if (SrcTy->isIntegerTy()) { // Casting from integral
2564 } else if (SrcTy->isFloatingPointTy()) { // Casting from floating pt
2569 } else if (SrcTy->isVectorTy()) {
2574 assert(SrcTy->isPointerTy() &&
2579 if (SrcTy->isIntegerTy()) { // Casting from integral
2584 } else if (SrcTy->isFloatingPointTy()) { // Casting from floating pt
2592 } else if (SrcTy->isVectorTy()) {
2603 if (SrcTy->isPointerTy()) {
2605 } else if (SrcTy->isIntegerTy()) {
2610 if (SrcTy->isVectorTy()) {
2631 Type *SrcTy = S->getType();
2634 if (SrcTy == DstTy)
2637 if (!SrcTy->isFirstClassType() || !DstTy->isFirstClassType() ||
2638 SrcTy->isAggregateType() || DstTy->isAggregateType())
2642 unsigned SrcBitSize = SrcTy->getScalarSizeInBits();
2648 unsigned SrcLength = SrcTy->isVectorTy() ?
2649 cast<VectorType>(SrcTy)->getNumElements() : 0;
2657 return SrcTy->isIntOrIntVectorTy() && DstTy->isIntOrIntVectorTy() &&
2660 return SrcTy->isIntOrIntVectorTy() && DstTy->isIntOrIntVectorTy() &&
2663 return SrcTy->isIntOrIntVectorTy() && DstTy->isIntOrIntVectorTy() &&
2666 return SrcTy->isFPOrFPVectorTy() && DstTy->isFPOrFPVectorTy() &&
2669 return SrcTy->isFPOrFPVectorTy() && DstTy->isFPOrFPVectorTy() &&
2673 return SrcTy->isIntOrIntVectorTy() && DstTy->isFPOrFPVectorTy() &&
2677 return SrcTy->isFPOrFPVectorTy() && DstTy->isIntOrIntVectorTy() &&
2680 if (isa<VectorType>(SrcTy) != isa<VectorType>(DstTy))
2682 if (VectorType *VT = dyn_cast<VectorType>(SrcTy))
2685 return SrcTy->getScalarType()->isPointerTy() &&
2688 if (isa<VectorType>(SrcTy) != isa<VectorType>(DstTy))
2690 if (VectorType *VT = dyn_cast<VectorType>(SrcTy))
2693 return SrcTy->getScalarType()->isIntegerTy() &&
2698 if (SrcTy->isPointerTy() != DstTy->isPointerTy())
2704 return SrcTy->getPrimitiveSizeInBits() == DstTy->getPrimitiveSizeInBits();