Lines Matching refs:dyn_cast

109   if (PointerType *PTy = dyn_cast<PointerType>(V->getType()))  in FoldBitCast()
110 if (PointerType *DPTy = dyn_cast<PointerType>(DestTy)) in FoldBitCast()
119 if (StructType *STy = dyn_cast<StructType>(ElTy)) { in FoldBitCast()
124 dyn_cast<SequentialType>(ElTy)) { in FoldBitCast()
141 if (VectorType *DestPTy = dyn_cast<VectorType>(DestTy)) { in FoldBitCast()
142 if (VectorType *SrcTy = dyn_cast<VectorType>(V->getType())) { in FoldBitCast()
167 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) { in FoldBitCast()
184 if (ConstantFP *FP = dyn_cast<ConstantFP>(V)) { in FoldBitCast()
222 if (ConstantInt *CI = dyn_cast<ConstantInt>(C)) { in ExtractConstantBytes()
232 ConstantExpr *CE = dyn_cast<ConstantExpr>(C); in ExtractConstantBytes()
243 if (ConstantInt *RHSC = dyn_cast<ConstantInt>(RHS)) in ExtractConstantBytes()
267 ConstantInt *Amt = dyn_cast<ConstantInt>(CE->getOperand(1)); in ExtractConstantBytes()
289 ConstantInt *Amt = dyn_cast<ConstantInt>(CE->getOperand(1)); in ExtractConstantBytes()
353 if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) { in getFoldedSizeOf()
359 if (StructType *STy = dyn_cast<StructType>(Ty)) in getFoldedSizeOf()
383 if (PointerType *PTy = dyn_cast<PointerType>(Ty)) in getFoldedSizeOf()
412 if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) { in getFoldedAlignOf()
421 if (StructType *STy = dyn_cast<StructType>(Ty)) { in getFoldedAlignOf()
448 if (PointerType *PTy = dyn_cast<PointerType>(Ty)) in getFoldedAlignOf()
477 if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) { in getFoldedOffsetOf()
485 if (StructType *STy = dyn_cast<StructType>(Ty)) in getFoldedOffsetOf()
541 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) { in ConstantFoldCastInstruction()
589 if (ConstantFP *FPC = dyn_cast<ConstantFP>(V)) { in ConstantFoldCastInstruction()
605 if (ConstantFP *FPC = dyn_cast<ConstantFP>(V)) { in ConstantFoldCastInstruction()
632 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(V)) in ConstantFoldCastInstruction()
650 if (StructType *STy = dyn_cast<StructType>(Ty)) in ConstantFoldCastInstruction()
671 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) { in ConstantFoldCastInstruction()
686 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) { in ConstantFoldCastInstruction()
693 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) { in ConstantFoldCastInstruction()
704 if (ConstantInt *CI = dyn_cast<ConstantInt>(V)) { in ConstantFoldCastInstruction()
733 if (ConstantVector *CondV = dyn_cast<ConstantVector>(Cond)) { in ConstantFoldSelectInstruction()
742 Constant *Cond = dyn_cast<Constant>(CondV->getOperand(i)); in ConstantFoldSelectInstruction()
767 if (ConstantExpr *TrueVal = dyn_cast<ConstantExpr>(V1)) { in ConstantFoldSelectInstruction()
772 if (ConstantExpr *FalseVal = dyn_cast<ConstantExpr>(V2)) { in ConstantFoldSelectInstruction()
791 if (ConstantInt *CIdx = dyn_cast<ConstantInt>(Idx)) { in ConstantFoldExtractElementInstruction()
804 ConstantInt *CIdx = dyn_cast<ConstantInt>(Idx); in ConstantFoldInsertElementInstruction()
885 if (StructType *ST = dyn_cast<StructType>(Agg->getType())) in ConstantFoldInsertValueInstruction()
887 else if (ArrayType *AT = dyn_cast<ArrayType>(Agg->getType())) in ConstantFoldInsertValueInstruction()
903 if (StructType *ST = dyn_cast<StructType>(Agg->getType())) in ConstantFoldInsertValueInstruction()
905 if (ArrayType *AT = dyn_cast<ArrayType>(Agg->getType())) in ConstantFoldInsertValueInstruction()
999 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2)) { in ConstantFoldBinaryInstruction()
1031 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) { in ConstantFoldBinaryInstruction()
1072 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) { in ConstantFoldBinaryInstruction()
1088 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) in ConstantFoldBinaryInstruction()
1100 if (ConstantInt *CI1 = dyn_cast<ConstantInt>(C1)) { in ConstantFoldBinaryInstruction()
1101 if (ConstantInt *CI2 = dyn_cast<ConstantInt>(C2)) { in ConstantFoldBinaryInstruction()
1163 } else if (ConstantFP *CFP1 = dyn_cast<ConstantFP>(C1)) { in ConstantFoldBinaryInstruction()
1164 if (ConstantFP *CFP2 = dyn_cast<ConstantFP>(C2)) { in ConstantFoldBinaryInstruction()
1188 } else if (VectorType *VTy = dyn_cast<VectorType>(C1->getType())) { in ConstantFoldBinaryInstruction()
1204 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) { in ConstantFoldBinaryInstruction()
1259 if (StructType *STy = dyn_cast<StructType>(Ty)) { in isMaybeZeroSizedType()
1267 } else if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) { in isMaybeZeroSizedType()
1335 R = dyn_cast<ConstantInt>( in evaluateFCmpRelation()
1339 R = dyn_cast<ConstantInt>( in evaluateFCmpRelation()
1343 R = dyn_cast<ConstantInt>( in evaluateFCmpRelation()
1381 if (const auto *GVar = dyn_cast<GlobalVariable>(GV)) { in areGlobalsPotentiallyEqual()
1426 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2)); in evaluateICmpRelation()
1430 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2)); in evaluateICmpRelation()
1434 R = dyn_cast<ConstantInt>(ConstantExpr::getICmp(pred, V1, V2)); in evaluateICmpRelation()
1448 } else if (const GlobalValue *GV = dyn_cast<GlobalValue>(V1)) { in evaluateICmpRelation()
1460 if (const GlobalValue *GV2 = dyn_cast<GlobalValue>(V2)) { in evaluateICmpRelation()
1471 } else if (const BlockAddress *BA = dyn_cast<BlockAddress>(V1)) { in evaluateICmpRelation()
1483 if (const BlockAddress *BA2 = dyn_cast<BlockAddress>(V2)) { in evaluateICmpRelation()
1533 if (const GlobalValue *GV = dyn_cast<GlobalValue>(CE1Op0)) { in evaluateICmpRelation()
1553 } else if (const GlobalValue *GV2 = dyn_cast<GlobalValue>(V2)) { in evaluateICmpRelation()
1563 } else if (const GlobalValue *GV = dyn_cast<GlobalValue>(CE1Op0)) { in evaluateICmpRelation()
1656 if (VectorType *VT = dyn_cast<VectorType>(C1->getType())) in ConstantFoldCompareInstruction()
1691 if (const GlobalValue *GV = dyn_cast<GlobalValue>(C2)) in ConstantFoldCompareInstruction()
1701 if (const GlobalValue *GV = dyn_cast<GlobalValue>(C1)) in ConstantFoldCompareInstruction()
1936 if (ConstantExpr *CE2 = dyn_cast<ConstantExpr>(C2)) { in ConstantFoldCompareInstruction()
1946 if (ConstantExpr *CE1 = dyn_cast<ConstantExpr>(C1)) { in ConstantFoldCompareInstruction()
1996 if (const PointerType *PTy = dyn_cast<PointerType>(STy)) in isIndexInRangeOfSequentialType()
2002 if (const ArrayType *ATy = dyn_cast<ArrayType>(STy)) in isIndexInRangeOfSequentialType()
2004 else if (const VectorType *VTy = dyn_cast<VectorType>(STy)) in isIndexInRangeOfSequentialType()
2058 if (ConstantExpr *CE = dyn_cast<ConstantExpr>(C)) { in ConstantFoldGetElementPtrImpl()
2091 if (ConstantInt *CI = dyn_cast<ConstantInt>(Idx0)) in ConstantFoldGetElementPtrImpl()
2141 dyn_cast<PointerType>(CE->getOperand(0)->getType()); in ConstantFoldGetElementPtrImpl()
2142 PointerType *DstPtrTy = dyn_cast<PointerType>(CE->getType()); in ConstantFoldGetElementPtrImpl()
2145 dyn_cast<ArrayType>(SrcPtrTy->getElementType()); in ConstantFoldGetElementPtrImpl()
2147 dyn_cast<ArrayType>(DstPtrTy->getElementType()); in ConstantFoldGetElementPtrImpl()
2166 if (ConstantInt *CI = dyn_cast<ConstantInt>(Idxs[i])) { in ConstantFoldGetElementPtrImpl()
2175 if (const ArrayType *ATy = dyn_cast<ArrayType>(Ty)) in ConstantFoldGetElementPtrImpl()
2224 if (auto *GV = dyn_cast<GlobalVariable>(C)) in ConstantFoldGetElementPtrImpl()