Home | History | Annotate | Download | only in InstCombine

Lines Matching refs:LI

158 static Instruction *InstCombineLoadCast(InstCombiner &IC, LoadInst &LI,
160 User *CI = cast<User>(LI.getOperand(0));
182 Idxs[0] = Constant::getNullValue(Type::getInt32Ty(LI.getContext()));
194 (SrcPTy->isPointerTy() == LI.getType()->isPointerTy()) &&
202 IC.Builder->CreateLoad(CastOp, LI.isVolatile(), CI->getName());
203 NewLoad->setAlignment(LI.getAlignment());
204 NewLoad->setAtomic(LI.getOrdering(), LI.getSynchScope());
206 return new BitCastInst(NewLoad, LI.getType());
213 Instruction *InstCombiner::visitLoadInst(LoadInst &LI) {
214 Value *Op = LI.getOperand(0);
219 getOrEnforceKnownAlignment(Op, TD->getPrefTypeAlignment(LI.getType()),TD);
220 unsigned LoadAlign = LI.getAlignment();
222 TD->getABITypeAlignment(LI.getType());
225 LI.setAlignment(KnownAlign);
227 LI.setAlignment(EffectiveLoadAlign);
232 if (Instruction *Res = InstCombineLoadCast(*this, LI, TD))
237 if (!LI.isSimple()) return 0;
242 BasicBlock::iterator BBI = &LI;
243 if (Value *AvailableVal = FindAvailableLoadedValue(Op, LI.getParent(), BBI,6))
244 return ReplaceInstUsesWith(LI, AvailableVal);
255 new StoreInst(UndefValue::get(LI.getType()),
256 Constant::getNullValue(Op->getType()), &LI);
257 return ReplaceInstUsesWith(LI, UndefValue::get(LI.getType()));
264 (isa<ConstantPointerNull>(Op) && LI.getPointerAddressSpace() == 0)) {
268 new StoreInst(UndefValue::get(LI.getType()),
269 Constant::getNullValue(Op->getType()), &LI);
270 return ReplaceInstUsesWith(LI, UndefValue::get(LI.getType()));
276 if (Instruction *Res = InstCombineLoadCast(*this, LI, TD))
292 unsigned Align = LI.getAlignment();
307 LI.setOperand(0, SI->getOperand(2));
308 return &LI;
314 LI.setOperand(0, SI->getOperand(1));
315 return &LI;
504 if (LoadInst *LI = dyn_cast<LoadInst>(BBI)) {
505 if (LI == Val && equivalentAddressValues(LI->getOperand(0), Ptr) &&
506 LI->isSimple())