Lines Matching refs:dyn_cast
415 if (VectorType *VInTy = dyn_cast<VectorType>(In)) { in MergeInTypeForLoadOrStore()
479 if (LoadInst *LI = dyn_cast<LoadInst>(UI)) { in CanConvertToScalar()
491 if (StoreInst *SI = dyn_cast<StoreInst>(UI)) { in CanConvertToScalar()
502 if (BitCastInst *BCI = dyn_cast<BitCastInst>(UI)) { in CanConvertToScalar()
510 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(UI)) { in CanConvertToScalar()
512 PointerType* PtrTy = dyn_cast<PointerType>(GEP->getPointerOperandType()); in CanConvertToScalar()
542 if (MemSetInst *MSI = dyn_cast<MemSetInst>(UI)) { in CanConvertToScalar()
551 ConstantInt *Len = dyn_cast<ConstantInt>(MSI->getLength()); in CanConvertToScalar()
569 if (MemTransferInst *MTI = dyn_cast<MemTransferInst>(UI)) { in CanConvertToScalar()
573 ConstantInt *Len = dyn_cast<ConstantInt>(MTI->getLength()); in CanConvertToScalar()
582 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(UI)) { in CanConvertToScalar()
609 if (BitCastInst *CI = dyn_cast<BitCastInst>(User)) { in ConvertUsesToScalar()
615 if (GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(User)) { in ConvertUsesToScalar()
634 if (LoadInst *LI = dyn_cast<LoadInst>(User)) { in ConvertUsesToScalar()
645 if (StoreInst *SI = dyn_cast<StoreInst>(User)) { in ConvertUsesToScalar()
662 if (MemSetInst *MSI = dyn_cast<MemSetInst>(User)) { in ConvertUsesToScalar()
695 if (MemTransferInst *MTI = dyn_cast<MemTransferInst>(User)) { in ConvertUsesToScalar()
744 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(User)) { in ConvertUsesToScalar()
779 if (VectorType *VTy = dyn_cast<VectorType>(FromType)) { in ConvertScalar_ExtractValue()
811 if (StructType *ST = dyn_cast<StructType>(ToType)) { in ConvertScalar_ExtractValue()
825 if (ArrayType *AT = dyn_cast<ArrayType>(ToType)) { in ConvertScalar_ExtractValue()
912 if (VectorType *VTy = dyn_cast<VectorType>(AllocaType)) { in ConvertScalar_InsertValue()
941 if (StructType *ST = dyn_cast<StructType>(SV->getType())) { in ConvertScalar_InsertValue()
954 if (ArrayType *AT = dyn_cast<ArrayType>(SV->getType())) { in ConvertScalar_InsertValue()
1065 if (DbgDeclareInst *DDI = dyn_cast<DbgDeclareInst>(U)) in run()
1067 else if (DbgValueInst *DVI = dyn_cast<DbgValueInst>(U)) in run()
1088 if (LoadInst *LI = dyn_cast<LoadInst>(I)) in isInstInList()
1097 if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) in updateDebugInfo()
1099 else if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) in updateDebugInfo()
1106 if (StoreInst *SI = dyn_cast<StoreInst>(Inst)) { in updateDebugInfo()
1109 if (ZExtInst *ZExt = dyn_cast<ZExtInst>(SI->getOperand(0))) in updateDebugInfo()
1110 Arg = dyn_cast<Argument>(ZExt->getOperand(0)); in updateDebugInfo()
1111 if (SExtInst *SExt = dyn_cast<SExtInst>(SI->getOperand(0))) in updateDebugInfo()
1112 Arg = dyn_cast<Argument>(SExt->getOperand(0)); in updateDebugInfo()
1115 } else if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) { in updateDebugInfo()
1147 LoadInst *LI = dyn_cast<LoadInst>(U); in isSafeSelectToSpeculate()
1189 LoadInst *LI = dyn_cast<LoadInst>(U); in isSafePHIToSpeculate()
1250 if (LoadInst *LI = dyn_cast<LoadInst>(U)) { in tryToMakeAllocaBePromotable()
1256 if (StoreInst *SI = dyn_cast<StoreInst>(U)) { in tryToMakeAllocaBePromotable()
1262 if (SelectInst *SI = dyn_cast<SelectInst>(U)) { in tryToMakeAllocaBePromotable()
1265 if (ConstantInt *CI = dyn_cast<ConstantInt>(SI->getCondition())) { in tryToMakeAllocaBePromotable()
1284 if (PHINode *PN = dyn_cast<PHINode>(U)) { in tryToMakeAllocaBePromotable()
1299 if (BitCastInst *BCI = dyn_cast<BitCastInst>(U)) { in tryToMakeAllocaBePromotable()
1317 if (BitCastInst *BCI = dyn_cast<BitCastInst>(InstsToRewrite[i])) { in tryToMakeAllocaBePromotable()
1326 if (SelectInst *SI = dyn_cast<SelectInst>(InstsToRewrite[i])) { in tryToMakeAllocaBePromotable()
1431 if (AllocaInst *AI = dyn_cast<AllocaInst>(I)) // Is it an alloca? in performPromotion()
1464 if (StructType *ST = dyn_cast<StructType>(T)) in ShouldAttemptScalarRepl()
1467 if (ArrayType *AT = dyn_cast<ArrayType>(T)) in ShouldAttemptScalarRepl()
1483 if (AllocaInst *A = dyn_cast<AllocaInst>(I)) in performScalarRepl()
1553 if (StructType *ST = dyn_cast<StructType>(AI->getAllocatedType())) { in DoScalarReplacement()
1592 if (Instruction *U = dyn_cast<Instruction>(*OI)) { in DeleteDeadInstructions()
1615 if (BitCastInst *BC = dyn_cast<BitCastInst>(User)) { in isSafeForScalarRepl()
1617 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(User)) { in isSafeForScalarRepl()
1622 } else if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(User)) { in isSafeForScalarRepl()
1623 ConstantInt *Length = dyn_cast<ConstantInt>(MI->getLength()); in isSafeForScalarRepl()
1630 } else if (LoadInst *LI = dyn_cast<LoadInst>(User)) { in isSafeForScalarRepl()
1638 } else if (StoreInst *SI = dyn_cast<StoreInst>(User)) { in isSafeForScalarRepl()
1647 } else if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(User)) { in isSafeForScalarRepl()
1673 if (PHINode *PN = dyn_cast<PHINode>(I)) in isSafePHISelectUseForScalarRepl()
1681 if (BitCastInst *BC = dyn_cast<BitCastInst>(UI)) { in isSafePHISelectUseForScalarRepl()
1683 } else if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(UI)) { in isSafePHISelectUseForScalarRepl()
1690 } else if (LoadInst *LI = dyn_cast<LoadInst>(UI)) { in isSafePHISelectUseForScalarRepl()
1698 } else if (StoreInst *SI = dyn_cast<StoreInst>(UI)) { in isSafePHISelectUseForScalarRepl()
1736 ConstantInt *IdxVal = dyn_cast<ConstantInt>(GEPIt.getOperand()); in isSafeGEP()
1763 if (ArrayType *AT = dyn_cast<ArrayType>(T)) { in isHomogeneousAggregate()
1768 if (StructType *ST = dyn_cast<StructType>(T)) { in isHomogeneousAggregate()
1848 if (StructType *ST = dyn_cast<StructType>(T)) { in TypeHasComponent()
1854 } else if (ArrayType *AT = dyn_cast<ArrayType>(T)) { in TypeHasComponent()
1860 } else if (VectorType *VT = dyn_cast<VectorType>(T)) { in TypeHasComponent()
1888 if (BitCastInst *BC = dyn_cast<BitCastInst>(User)) { in RewriteForScalarRepl()
1893 if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(User)) { in RewriteForScalarRepl()
1898 if (MemIntrinsic *MI = dyn_cast<MemIntrinsic>(User)) { in RewriteForScalarRepl()
1899 ConstantInt *Length = dyn_cast<ConstantInt>(MI->getLength()); in RewriteForScalarRepl()
1908 if (IntrinsicInst *II = dyn_cast<IntrinsicInst>(User)) { in RewriteForScalarRepl()
1916 if (LoadInst *LI = dyn_cast<LoadInst>(User)) { in RewriteForScalarRepl()
1945 if (StoreInst *SI = dyn_cast<StoreInst>(User)) { in RewriteForScalarRepl()
2028 if (StructType *ST = dyn_cast<StructType>(T)) { in FindElementAndOffset()
2035 } else if (ArrayType *AT = dyn_cast<ArrayType>(T)) { in FindElementAndOffset()
2185 if (MemTransferInst *MTI = dyn_cast<MemTransferInst>(MI)) { // memmove/memcopy in RewriteMemIntrinUserOfAlloca()
2248 if (StructType *ST = dyn_cast<StructType>(OtherTy)) { in RewriteMemIntrinUserOfAlloca()
2285 if (ConstantInt *CI = dyn_cast<ConstantInt>(MI->getArgOperand(1))) { in RewriteMemIntrinUserOfAlloca()
2372 if (StructType *EltSTy = dyn_cast<StructType>(AllocaEltTy)) { in RewriteStoreUserOfWholeAlloca()
2482 if (StructType *EltSTy = dyn_cast<StructType>(AllocaEltTy)) { in RewriteLoadUserOfWholeAlloca()
2557 if (ArrayType *ATy = dyn_cast<ArrayType>(Ty)) { in HasPadding()
2620 if (StructType *ST = dyn_cast<StructType>(AI->getAllocatedType())) { in isSafeAllocaToScalarRepl()