Changeset View
Changeset View
Standalone View
Standalone View
lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
Context not available. | |||||
// separated by a few arithmetic operations. | // separated by a few arithmetic operations. | ||||
BasicBlock::iterator BBI = &LI; | BasicBlock::iterator BBI = &LI; | ||||
AAMDNodes AATags; | AAMDNodes AATags; | ||||
if (Value *AvailableVal = FindAvailableLoadedValue(Op, LI.getParent(), BBI, | if (Value *AvailableVal = | ||||
6, AA, &AATags)) { | FindAvailableLoadedValue(Op, LI.getParent(), BBI, | ||||
DEF_MAX_INSTS_TO_SCAN, AA, &AATags)) { | |||||
if (LoadInst *NLI = dyn_cast<LoadInst>(AvailableVal)) { | if (LoadInst *NLI = dyn_cast<LoadInst>(AvailableVal)) { | ||||
unsigned KnownIDs[] = { | unsigned KnownIDs[] = { | ||||
LLVMContext::MD_tbaa, | LLVMContext::MD_tbaa, | ||||
Context not available. | |||||
} | } | ||||
// load (select (cond, null, P)) -> load P | // load (select (cond, null, P)) -> load P | ||||
if (isa<ConstantPointerNull>(SI->getOperand(1)) && | if (isa<ConstantPointerNull>(SI->getOperand(1)) && | ||||
LI.getPointerAddressSpace() == 0) { | LI.getPointerAddressSpace() == 0) { | ||||
LI.setOperand(0, SI->getOperand(2)); | LI.setOperand(0, SI->getOperand(2)); | ||||
return &LI; | return &LI; | ||||
Context not available. |