From 5e6431c140ab0d2aa3846e6b3219131d9c1345fc Mon Sep 17 00:00:00 2001 From: Owen Anderson Date: Tue, 13 May 2008 21:25:37 +0000 Subject: [PATCH] Fix memdep's handling of invokes when finding the dependency of another call instruction. This fixes some Ada miscompiles reported in PR2324. llvm-svn: 51069 --- lib/Analysis/MemoryDependenceAnalysis.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Analysis/MemoryDependenceAnalysis.cpp b/lib/Analysis/MemoryDependenceAnalysis.cpp index 4af7b42fb79..7a6633f8fed 100644 --- a/lib/Analysis/MemoryDependenceAnalysis.cpp +++ b/lib/Analysis/MemoryDependenceAnalysis.cpp @@ -129,7 +129,7 @@ Instruction* MemoryDependenceAnalysis::getCallSiteDependency(CallSite C, // FreeInsts erase the entire structure pointerSize = ~0UL; - } else if (isa(QI)) { + } else if (CallSite::get(QI).getInstruction() != 0) { AliasAnalysis::ModRefBehavior result = AA.getModRefBehavior(CallSite::get(QI)); if (result != AliasAnalysis::DoesNotAccessMemory) {