• Home
  • Raw
  • Download

Lines Matching refs:LI

57     if (LoadInst *LI = dyn_cast<LoadInst>(U)) {  in isOnlyCopiedFromConstantGlobal()  local
59 if (!LI->isSimple()) return false; in isOnlyCopiedFromConstantGlobal()
282 static Instruction *InstCombineLoadCast(InstCombiner &IC, LoadInst &LI, in InstCombineLoadCast() argument
284 User *CI = cast<User>(LI.getOperand(0)); in InstCombineLoadCast()
306 Idxs[0] = Constant::getNullValue(Type::getInt32Ty(LI.getContext())); in InstCombineLoadCast()
318 (SrcPTy->isPointerTy() == LI.getType()->isPointerTy()) && in InstCombineLoadCast()
326 IC.Builder->CreateLoad(CastOp, LI.isVolatile(), CI->getName()); in InstCombineLoadCast()
327 NewLoad->setAlignment(LI.getAlignment()); in InstCombineLoadCast()
328 NewLoad->setAtomic(LI.getOrdering(), LI.getSynchScope()); in InstCombineLoadCast()
330 return new BitCastInst(NewLoad, LI.getType()); in InstCombineLoadCast()
337 Instruction *InstCombiner::visitLoadInst(LoadInst &LI) { in visitLoadInst() argument
338 Value *Op = LI.getOperand(0); in visitLoadInst()
343 getOrEnforceKnownAlignment(Op, TD->getPrefTypeAlignment(LI.getType()),TD); in visitLoadInst()
344 unsigned LoadAlign = LI.getAlignment(); in visitLoadInst()
346 TD->getABITypeAlignment(LI.getType()); in visitLoadInst()
349 LI.setAlignment(KnownAlign); in visitLoadInst()
351 LI.setAlignment(EffectiveLoadAlign); in visitLoadInst()
356 if (Instruction *Res = InstCombineLoadCast(*this, LI, TD)) in visitLoadInst()
361 if (!LI.isSimple()) return 0; in visitLoadInst()
366 BasicBlock::iterator BBI = &LI; in visitLoadInst()
367 if (Value *AvailableVal = FindAvailableLoadedValue(Op, LI.getParent(), BBI,6)) in visitLoadInst()
368 return ReplaceInstUsesWith(LI, AvailableVal); in visitLoadInst()
379 new StoreInst(UndefValue::get(LI.getType()), in visitLoadInst()
380 Constant::getNullValue(Op->getType()), &LI); in visitLoadInst()
381 return ReplaceInstUsesWith(LI, UndefValue::get(LI.getType())); in visitLoadInst()
388 (isa<ConstantPointerNull>(Op) && LI.getPointerAddressSpace() == 0)) { in visitLoadInst()
392 new StoreInst(UndefValue::get(LI.getType()), in visitLoadInst()
393 Constant::getNullValue(Op->getType()), &LI); in visitLoadInst()
394 return ReplaceInstUsesWith(LI, UndefValue::get(LI.getType())); in visitLoadInst()
400 if (Instruction *Res = InstCombineLoadCast(*this, LI, TD)) in visitLoadInst()
416 unsigned Align = LI.getAlignment(); in visitLoadInst()
431 LI.setOperand(0, SI->getOperand(2)); in visitLoadInst()
432 return &LI; in visitLoadInst()
438 LI.setOperand(0, SI->getOperand(1)); in visitLoadInst()
439 return &LI; in visitLoadInst()
628 if (LoadInst *LI = dyn_cast<LoadInst>(BBI)) { in visitStoreInst() local
629 if (LI == Val && equivalentAddressValues(LI->getOperand(0), Ptr) && in visitStoreInst()
630 LI->isSimple()) in visitStoreInst()