summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine
diff options
context:
space:
mode:
authorLarisse Voufo <lvoufo@google.com>2015-09-15 19:14:05 +0000
committerLarisse Voufo <lvoufo@google.com>2015-09-15 19:14:05 +0000
commit6b867c725400d4b3bd3411c41359fdfa045e1c5d (patch)
tree6984c9eec9b2522c6e3504cdeb273c8cb7ea420b /llvm/lib/Transforms/InstCombine
parent4eea8c6b824402f07a630f596fd3b0b6a4ec5c4f (diff)
downloadbcm5719-llvm-6b867c725400d4b3bd3411c41359fdfa045e1c5d.tar.gz
bcm5719-llvm-6b867c725400d4b3bd3411c41359fdfa045e1c5d.zip
Revert "Clean up: Refactoring the hardcoded value of 6 for FindAvailableLoadedValue()'s parameter MaxInstsToScan." for preliminary community discussion (See. D12886)
llvm-svn: 247716
Diffstat (limited to 'llvm/lib/Transforms/InstCombine')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
index 32d3f80d15e..3c70f442647 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
@@ -750,9 +750,8 @@ Instruction *InstCombiner::visitLoadInst(LoadInst &LI) {
// separated by a few arithmetic operations.
BasicBlock::iterator BBI = &LI;
AAMDNodes AATags;
- if (Value *AvailableVal =
- FindAvailableLoadedValue(Op, LI.getParent(), BBI,
- DEF_MAX_INSTS_TO_SCAN, AA, &AATags)) {
+ if (Value *AvailableVal = FindAvailableLoadedValue(Op, LI.getParent(), BBI,
+ 6, AA, &AATags)) {
if (LoadInst *NLI = dyn_cast<LoadInst>(AvailableVal)) {
unsigned KnownIDs[] = {
LLVMContext::MD_tbaa,
@@ -823,7 +822,7 @@ Instruction *InstCombiner::visitLoadInst(LoadInst &LI) {
}
// load (select (cond, null, P)) -> load P
- if (isa<ConstantPointerNull>(SI->getOperand(1)) &&
+ if (isa<ConstantPointerNull>(SI->getOperand(1)) &&
LI.getPointerAddressSpace() == 0) {
LI.setOperand(0, SI->getOperand(2));
return &LI;
OpenPOWER on IntegriCloud