From: Chris Lattner Date: Mon, 18 Feb 2008 02:11:28 +0000 (+0000) Subject: bitcasts of pointers are always pointers. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=0ab5a4ae552765069baf4a45fcc26dba817020f9;p=oota-llvm.git bitcasts of pointers are always pointers. If we see a memcpy of a pointer, make sure to check later uses of the pointer as well. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47250 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp index 430e74a98bf..4c7259f7f4c 100644 --- a/lib/Analysis/BasicAliasAnalysis.cpp +++ b/lib/Analysis/BasicAliasAnalysis.cpp @@ -219,8 +219,6 @@ static bool AddressMightEscape(const Value *V) { return true; break; // next use. case Instruction::BitCast: - if (!isa(I->getType())) - return true; if (AddressMightEscape(I)) return true; break; // next use @@ -231,10 +229,9 @@ static bool AddressMightEscape(const Value *V) { case Instruction::Call: // If the call is to a few known safe intrinsics, we know that it does // not escape - if (isa(I)) - return false; - else + if (!isa(I)) return true; + break; // next use default: return true; }