Home | History | Annotate | Download | only in Scalar

Lines Matching refs:LI

156     void RewriteLoadUserOfWholeAlloca(LoadInst *LI, AllocaInst *AI,
418 if (LoadInst *LI = dyn_cast<LoadInst>(User)) {
420 if (!LI->isSimple())
423 if (LI->getType()->isX86_MMXTy())
426 MergeInTypeForLoadOrStore(LI->getType(), Offset);
548 if (LoadInst *LI = dyn_cast<LoadInst>(User)) {
552 = ConvertScalar_ExtractValue(LoadedVal, LI->getType(), Offset, Builder);
553 LI->replaceAllUsesWith(NewLoadVal);
554 LI->eraseFromParent();
967 if (LoadInst *LI = dyn_cast<LoadInst>(I))
968 return LI->getOperand(0) == AI;
978 else if (LoadInst *LI = dyn_cast<LoadInst>(Inst))
979 ConvertDebugDeclareToDebugValue(DDI, LI, *DIB);
994 } else if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) {
995 Arg = LI->getOperand(0);
1027 LoadInst *LI = dyn_cast<LoadInst>(*UI);
1028 if (LI == 0 || !LI->isSimple()) return false;
1032 if (!TDerefable && !isSafeToLoadUnconditionally(SI->getTrueValue(), LI,
1033 LI->getAlignment(), TD))
1035 if (!FDerefable && !isSafeToLoadUnconditionally(SI->getFalseValue(), LI,
1036 LI->getAlignment(), TD))
1068 LoadInst *LI = dyn_cast<LoadInst>(*UI);
1069 if (LI == 0 || !LI->isSimple()) return false;
1073 if (LI->getParent() != BB) return false;
1077 for (BasicBlock::iterator BBI = PN; &*BBI != LI; ++BBI)
1081 MaxAlign = std::max(MaxAlign, LI->getAlignment());
1130 if (LoadInst *LI = dyn_cast<LoadInst>(U)) {
1131 if (!LI->isSimple())
1213 LoadInst *LI = cast<LoadInst>(SI->use_back());
1215 IRBuilder<> Builder(LI);
1217 Builder.CreateLoad(SI->getTrueValue(), LI->getName()+".t");
1219 Builder.CreateLoad(SI->getFalseValue(), LI->getName()+".f");
1222 LI->getAlignment());
1223 FalseLoad->setAlignment(LI->getAlignment());
1224 if (MDNode *Tag = LI->getMetadata(LLVMContext::MD_tbaa)) {
1230 V->takeName(LI);
1231 LI->replaceAllUsesWith(V);
1232 LI->eraseFromParent();
1260 LoadInst *LI = cast<LoadInst>(PN->use_back());
1261 LI->replaceAllUsesWith(NewPN);
1262 LI->eraseFromParent();
1527 } else if (LoadInst *LI = dyn_cast<LoadInst>(User)) {
1528 if (!LI->isSimple())
1530 Type *LIType = LI->getType();
1532 LIType, false, Info, LI, true /*AllowWholeAccess*/);
1586 } else if (LoadInst *LI = dyn_cast<LoadInst>(User)) {
1587 if (!LI->isSimple())
1589 Type *LIType = LI->getType();
1591 LIType, false, Info, LI, false /*AllowWholeAccess*/);
1794 if (LoadInst *LI = dyn_cast<LoadInst>(User)) {
1795 Type *LIType = LI->getType();
1807 IRBuilder<> Builder(LI);
1812 LI->replaceAllUsesWith(Insert);
1813 DeadInsts.push_back(LI);
1818 RewriteLoadUserOfWholeAlloca(LI, AI, NewElts);
2310 void SROA::RewriteLoadUserOfWholeAlloca(LoadInst *LI, AllocaInst *AI,
2317 DEBUG(dbgs() << "PROMOTING LOAD OF WHOLE ALLOCA: " << *AI << '\n' << *LI
2332 Constant::getNullValue(IntegerType::get(LI->getContext(), AllocaSizeBits));
2345 IntegerType *FieldIntTy = IntegerType::get(LI->getContext(),
2351 "", LI);
2352 SrcField = new LoadInst(SrcField, "sroa.load.elt", LI);
2357 SrcField = new BitCastInst(SrcField, FieldIntTy, "", LI);
2362 SrcField = new ZExtInst(SrcField, ResultVal->getType(), "", LI);
2376 SrcField = BinaryOperator::CreateShl(SrcField, ShiftVal, "", LI);
2382 ResultVal = BinaryOperator::CreateOr(SrcField, ResultVal, "", LI);
2388 if (TD->getTypeSizeInBits(LI->getType()) != AllocaSizeBits)
2389 ResultVal = new TruncInst(ResultVal, LI->getType(), "", LI);
2391 LI->replaceAllUsesWith(ResultVal);
2392 DeadInsts.push_back(LI);
2504 if (LoadInst *LI = dyn_cast<LoadInst>(U)) {
2506 if (!LI->isSimple()) return false;