reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
  950   Value *Op = LI.getOperand(0);
  953   if (Instruction *Res = combineLoadToOperationType(*this, LI))
  958       Op, DL.getPrefTypeAlignment(LI.getType()), DL, &LI, &AC, &DT);
  958       Op, DL.getPrefTypeAlignment(LI.getType()), DL, &LI, &AC, &DT);
  959   unsigned LoadAlign = LI.getAlignment();
  961       LoadAlign != 0 ? LoadAlign : DL.getABITypeAlignment(LI.getType());
  964     LI.setAlignment(MaybeAlign(KnownAlign));
  966     LI.setAlignment(MaybeAlign(EffectiveLoadAlign));
  969   if (Instruction *NewGEPI = replaceGEPIdxWithZero(*this, Op, LI)) {
  971       return &LI;
  974   if (Instruction *Res = unpackLoadToAggregate(*this, LI))
  980   BasicBlock::iterator BBI(LI);
  983           &LI, LI.getParent(), BBI, DefMaxInstsToScan, AA, &IsLoadCSE)) {
  983           &LI, LI.getParent(), BBI, DefMaxInstsToScan, AA, &IsLoadCSE)) {
  985       combineMetadataForCSE(cast<LoadInst>(AvailableVal), &LI, false);
  988         LI, Builder.CreateBitOrPointerCast(AvailableVal, LI.getType(),
  988         LI, Builder.CreateBitOrPointerCast(AvailableVal, LI.getType(),
  989                                            LI.getName() + ".cast"));
  994   if (!LI.isUnordered()) return nullptr;
  999   if (canSimplifyNullLoadOrGEP(LI, Op)) {
 1004     StoreInst *SI = new StoreInst(UndefValue::get(LI.getType()),
 1005                                   Constant::getNullValue(Op->getType()), &LI);
 1006     SI->setDebugLoc(LI.getDebugLoc());
 1007     return replaceInstUsesWith(LI, UndefValue::get(LI.getType()));
 1007     return replaceInstUsesWith(LI, UndefValue::get(LI.getType()));
 1023       const MaybeAlign Alignment(LI.getAlignment());
 1024       if (isSafeToLoadUnconditionally(SI->getOperand(1), LI.getType(),
 1026           isSafeToLoadUnconditionally(SI->getOperand(2), LI.getType(),
 1029             Builder.CreateLoad(LI.getType(), SI->getOperand(1),
 1032             Builder.CreateLoad(LI.getType(), SI->getOperand(2),
 1034         assert(LI.isUnordered() && "implied by above");
 1036         V1->setAtomic(LI.getOrdering(), LI.getSyncScopeID());
 1036         V1->setAtomic(LI.getOrdering(), LI.getSyncScopeID());
 1038         V2->setAtomic(LI.getOrdering(), LI.getSyncScopeID());
 1038         V2->setAtomic(LI.getOrdering(), LI.getSyncScopeID());
 1045                                 LI.getPointerAddressSpace())) {
 1046         LI.setOperand(0, SI->getOperand(2));
 1047         return &LI;
 1053                                 LI.getPointerAddressSpace())) {
 1054         LI.setOperand(0, SI->getOperand(1));
 1055         return &LI;