Lines Matching refs:SrcTy

2054   Type* SrcTy = getOperand(0)->getType();
2056 if (SrcTy == DstTy)
2060 if (SrcTy->isPointerTy())
2074 Type *SrcTy,
2096 SrcTy->getScalarSizeInBits();
2108 /// * %F = firstOpcode SrcTy %x to MidTy
2111 /// * %Replacement = resultOpcode %SrcTy %x to DstTy
2115 Type *SrcTy, Type *MidTy, Type *DstTy, Type *IntPtrTy) {
2171 bool chainedBitcast = (SrcTy == DstTy && isFirstBitcast && isSecondBitcast);
2174 if ((isFirstBitcast && isa<VectorType>(SrcTy) != isa<VectorType>(MidTy)) ||
2195 if (!SrcTy->isVectorTy() && DstTy->isIntegerTy())
2205 // no-op cast in first op implies secondOp as long as the SrcTy
2207 if (SrcTy->isIntegerTy())
2211 // no-op cast in first op implies secondOp as long as the SrcTy
2213 if (SrcTy->isFloatingPointTy())
2227 // ext, trunc -> bitcast, if the SrcTy and DstTy are same size
2228 // ext, trunc -> ext, if sizeof(SrcTy) < sizeof(DstTy)
2229 // ext, trunc -> trunc, if sizeof(SrcTy) > sizeof(DstTy)
2230 unsigned SrcSize = SrcTy->getScalarSizeInBits();
2243 if (SrcTy == DstTy)
2249 if (SrcTy->isPointerTy() && MidTy->isPointerTy())
2262 unsigned SrcSize = SrcTy->getScalarSizeInBits();
2448 bool CastInst::isCastable(Type *SrcTy, Type *DestTy) {
2449 if (!SrcTy->isFirstClassType() || !DestTy->isFirstClassType())
2452 if (SrcTy == DestTy)
2455 if (VectorType *SrcVecTy = dyn_cast<VectorType>(SrcTy))
2459 SrcTy = SrcVecTy->getElementType();
2464 unsigned SrcBits = SrcTy->getPrimitiveSizeInBits(); // 0 for ptr
2469 if (SrcTy->isIntegerTy()) { // Casting from integral
2471 } else if (SrcTy->isFloatingPointTy()) { // Casting from floating pt
2473 } else if (SrcTy->isVectorTy()) { // Casting from vector
2476 return SrcTy->isPointerTy();
2479 if (SrcTy->isIntegerTy()) { // Casting from integral
2481 } else if (SrcTy->isFloatingPointTy()) { // Casting from floating pt
2483 } else if (SrcTy->isVectorTy()) { // Casting from vector
2491 if (SrcTy->isPointerTy()) { // Casting from pointer
2493 } else if (SrcTy->isIntegerTy()) { // Casting from integral
2499 if (SrcTy->isVectorTy()) {
2519 Type *SrcTy = Src->getType();
2521 assert(SrcTy->isFirstClassType() && DestTy->isFirstClassType() &&
2524 if (SrcTy == DestTy)
2527 if (VectorType *SrcVecTy = dyn_cast<VectorType>(SrcTy))
2532 SrcTy = SrcVecTy->getElementType();
2537 unsigned SrcBits = SrcTy->getPrimitiveSizeInBits(); // 0 for ptr
2542 if (SrcTy->isIntegerTy()) { // Casting from integral
2553 } else if (SrcTy->isFloatingPointTy()) { // Casting from floating pt
2558 } else if (SrcTy->isVectorTy()) {
2563 assert(SrcTy->isPointerTy() &&
2568 if (SrcTy->isIntegerTy()) { // Casting from integral
2573 } else if (SrcTy->isFloatingPointTy()) { // Casting from floating pt
2581 } else if (SrcTy->isVectorTy()) {
2592 if (SrcTy->isPointerTy()) {
2594 } else if (SrcTy->isIntegerTy()) {
2599 if (SrcTy->isVectorTy()) {
2620 Type *SrcTy = S->getType();
2621 if (!SrcTy->isFirstClassType() || !DstTy->isFirstClassType() ||
2622 SrcTy->isAggregateType() || DstTy->isAggregateType())
2626 unsigned SrcBitSize = SrcTy->getScalarSizeInBits();
2632 unsigned SrcLength = SrcTy->isVectorTy() ?
2633 cast<VectorType>(SrcTy)->getNumElements() : 0;
2641 return SrcTy->isIntOrIntVectorTy() && DstTy->isIntOrIntVectorTy() &&
2644 return SrcTy->isIntOrIntVectorTy() && DstTy->isIntOrIntVectorTy() &&
2647 return SrcTy->isIntOrIntVectorTy() && DstTy->isIntOrIntVectorTy() &&
2650 return SrcTy->isFPOrFPVectorTy() && DstTy->isFPOrFPVectorTy() &&
2653 return SrcTy->isFPOrFPVectorTy() && DstTy->isFPOrFPVectorTy() &&
2657 return SrcTy->isIntOrIntVectorTy() && DstTy->isFPOrFPVectorTy() &&
2661 return SrcTy->isFPOrFPVectorTy() && DstTy->isIntOrIntVectorTy() &&
2664 if (isa<VectorType>(SrcTy) != isa<VectorType>(DstTy))
2666 if (VectorType *VT = dyn_cast<VectorType>(SrcTy))
2669 return SrcTy->getScalarType()->isPointerTy() &&
2672 if (isa<VectorType>(SrcTy) != isa<VectorType>(DstTy))
2674 if (VectorType *VT = dyn_cast<VectorType>(SrcTy))
2677 return SrcTy->getScalarType()->isIntegerTy() &&
2682 if (SrcTy->isPointerTy() != DstTy->isPointerTy())
2688 return SrcTy->getPrimitiveSizeInBits() == DstTy->getPrimitiveSizeInBits();