Home | History | Annotate | Download | only in Scalar

Lines Matching refs:LI

182     void RewriteLoadUserOfWholeAlloca(LoadInst *LI, AllocaInst *AI,
472 if (LoadInst *LI = dyn_cast<LoadInst>(User)) {
474 if (!LI->isSimple())
477 if (LI->getType()->isX86_MMXTy())
480 MergeInTypeForLoadOrStore(LI->getType(), Offset);
627 if (LoadInst *LI = dyn_cast<LoadInst>(User)) {
631 = ConvertScalar_ExtractValue(LoadedVal, LI->getType(), Offset,
633 LI->replaceAllUsesWith(NewLoadVal);
634 LI->eraseFromParent();
1083 if (LoadInst *LI = dyn_cast<LoadInst>(I))
1084 return LI->getOperand(0) == AI;
1094 else if (LoadInst *LI = dyn_cast<LoadInst>(Inst))
1095 ConvertDebugDeclareToDebugValue(DDI, LI, *DIB);
1110 } else if (LoadInst *LI = dyn_cast<LoadInst>(Inst)) {
1111 Arg = LI->getOperand(0);
1143 LoadInst *LI = dyn_cast<LoadInst>(*UI);
1144 if (LI == 0 || !LI->isSimple()) return false;
1148 if (!TDerefable && !isSafeToLoadUnconditionally(SI->getTrueValue(), LI,
1149 LI->getAlignment(), TD))
1151 if (!FDerefable && !isSafeToLoadUnconditionally(SI->getFalseValue(), LI,
1152 LI->getAlignment(), TD))
1184 LoadInst *LI = dyn_cast<LoadInst>(*UI);
1185 if (LI == 0 || !LI->isSimple()) return false;
1189 if (LI->getParent() != BB) return false;
1193 for (BasicBlock::iterator BBI = PN; &*BBI != LI; ++BBI)
1197 MaxAlign = std::max(MaxAlign, LI->getAlignment());
1246 if (LoadInst *LI = dyn_cast<LoadInst>(U)) {
1247 if (!LI->isSimple())
1329 LoadInst *LI = cast<LoadInst>(SI->use_back());
1331 IRBuilder<> Builder(LI);
1333 Builder.CreateLoad(SI->getTrueValue(), LI->getName()+".t");
1335 Builder.CreateLoad(SI->getFalseValue(), LI->getName()+".f");
1338 TrueLoad->setAlignment(LI->getAlignment());
1339 FalseLoad->setAlignment(LI->getAlignment());
1340 if (MDNode *Tag = LI->getMetadata(LLVMContext::MD_tbaa)) {
1346 V->takeName(LI);
1347 LI->replaceAllUsesWith(V);
1348 LI->eraseFromParent();
1376 LoadInst *LI = cast<LoadInst>(PN->use_back());
1377 LI->replaceAllUsesWith(NewPN);
1378 LI->eraseFromParent();
1621 } else if (LoadInst *LI = dyn_cast<LoadInst>(User)) {
1622 if (!LI->isSimple())
1624 Type *LIType = LI->getType();
1626 LIType, false, Info, LI, true /*AllowWholeAccess*/);
1680 } else if (LoadInst *LI = dyn_cast<LoadInst>(User)) {
1681 if (!LI->isSimple())
1683 Type *LIType = LI->getType();
1685 LIType, false, Info, LI, false /*AllowWholeAccess*/);
1911 if (LoadInst *LI = dyn_cast<LoadInst>(User)) {
1912 Type *LIType = LI->getType();
1924 IRBuilder<> Builder(LI);
1929 LI->replaceAllUsesWith(Insert);
1930 DeadInsts.push_back(LI);
1935 RewriteLoadUserOfWholeAlloca(LI, AI, NewElts);
2452 void SROA::RewriteLoadUserOfWholeAlloca(LoadInst *LI, AllocaInst *AI,
2459 DEBUG(dbgs() << "PROMOTING LOAD OF WHOLE ALLOCA: " << *AI << '\n' << *LI
2474 Constant::getNullValue(IntegerType::get(LI->getContext(), AllocaSizeBits));
2487 IntegerType *FieldIntTy = IntegerType::get(LI->getContext(),
2493 "", LI);
2494 SrcField = new LoadInst(SrcField, "sroa.load.elt", LI);
2499 SrcField = new BitCastInst(SrcField, FieldIntTy, "", LI);
2504 SrcField = new ZExtInst(SrcField, ResultVal->getType(), "", LI);
2518 SrcField = BinaryOperator::CreateShl(SrcField, ShiftVal, "", LI);
2524 ResultVal = BinaryOperator::CreateOr(SrcField, ResultVal, "", LI);
2530 if (TD->getTypeSizeInBits(LI->getType()) != AllocaSizeBits)
2531 ResultVal = new TruncInst(ResultVal, LI->getType(), "", LI);
2533 LI->replaceAllUsesWith(ResultVal);
2534 DeadInsts.push_back(LI);