Index: lib/Analysis/CFLAliasAnalysis.cpp =================================================================== --- lib/Analysis/CFLAliasAnalysis.cpp +++ lib/Analysis/CFLAliasAnalysis.cpp @@ -377,7 +377,7 @@ } static bool isFunctionExternal(Function *Fn) { - return Fn->isDeclaration() || !Fn->hasLocalLinkage(); + return !Fn->hasExactDefinition(); } bool tryInterproceduralAnalysis(CallSite CS, Index: test/Analysis/CFLAliasAnalysis/interproc-ret-arg.ll =================================================================== --- test/Analysis/CFLAliasAnalysis/interproc-ret-arg.ll +++ test/Analysis/CFLAliasAnalysis/interproc-ret-arg.ll @@ -3,9 +3,6 @@ ; RUN: opt < %s -disable-basicaa -cfl-aa -aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s ; RUN: opt < %s -aa-pipeline=cfl-aa -passes=aa-eval -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s -; We have to xfail this since @return_arg_callee is treated as an opaque function, and the anlysis couldn't prove that %b and %c are not aliases -; XFAIL: * - define i32* @return_arg_callee(i32* %arg1, i32* %arg2) { ret i32* %arg1 }