[llvm-commits] [llvm] r47268 - /llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
Owen Anderson
resistor at mac.com
Mon Feb 18 02:11:09 PST 2008
Author: resistor
Date: Mon Feb 18 04:11:00 2008
New Revision: 47268
URL: http://llvm.org/viewvc/llvm-project?rev=47268&view=rev
Log:
Since we're not checking for the more general AllocationInst first, we need to explicitly check
that Object is an Argument before casting it to one.
Modified:
llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp?rev=47268&r1=47267&r2=47268&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/BasicAliasAnalysis.cpp Mon Feb 18 04:11:00 2008
@@ -272,7 +272,7 @@
// If this is a tail call and P points to a stack location, we know that
// the tail call cannot access or modify the local stack.
if (isa<AllocaInst>(Object) ||
- cast<Argument>(Object)->hasByValAttr())
+ (isa<Argument>(Object) && cast<Argument>(Object)->hasByValAttr()))
if (CallInst *CI = dyn_cast<CallInst>(CS.getInstruction()))
if (CI->isTailCall())
return NoModRef;
More information about the llvm-commits
mailing list