summaryrefslogtreecommitdiffstats
path: root/lib/Analysis
diff options
context:
space:
mode:
authorDan Gohman <dan433584@gmail.com>2013-01-31 23:49:33 +0000
committerDan Gohman <dan433584@gmail.com>2013-01-31 23:49:33 +0000
commitac08785edaac826afe11a4e596a46fc693848848 (patch)
tree3113dd8303ade3bda241d64bc22e2ced5e711207 /lib/Analysis
parent27aacedf7d975243170206efb948a20d6fd4a2c1 (diff)
downloadexternal_llvm-ac08785edaac826afe11a4e596a46fc693848848.zip
external_llvm-ac08785edaac826afe11a4e596a46fc693848848.tar.gz
external_llvm-ac08785edaac826afe11a4e596a46fc693848848.tar.bz2
An alloca can be equal to an argument. It can't *alias* an alloca, but it could
be equal, since there's nothing preventing a caller from correctly predicting the stack location of an alloca. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174119 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/InstructionSimplify.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/Analysis/InstructionSimplify.cpp b/lib/Analysis/InstructionSimplify.cpp
index d5e38e5..f8e76ca 100644
--- a/lib/Analysis/InstructionSimplify.cpp
+++ b/lib/Analysis/InstructionSimplify.cpp
@@ -1828,18 +1828,6 @@ static Value *SimplifyICmpInst(unsigned Predicate, Value *LHS, Value *RHS,
else if (Pred == CmpInst::ICMP_NE)
return ConstantInt::get(ITy, true);
}
- } else if (Argument *LHSArg = dyn_cast<Argument>(LHSPtr)) {
- RHSPtr = RHSPtr->stripInBoundsOffsets();
- // An alloca can't be equal to an argument unless they come from separate
- // functions via inlining.
- if (AllocaInst *RHSInst = dyn_cast<AllocaInst>(RHSPtr)) {
- if (LHSArg->getParent() == RHSInst->getParent()->getParent()) {
- if (Pred == CmpInst::ICMP_EQ)
- return ConstantInt::get(ITy, false);
- else if (Pred == CmpInst::ICMP_NE)
- return ConstantInt::get(ITy, true);
- }
- }
}
// If we are comparing with zero then try hard since this is a common case.