diff options
author | Duncan Sands <baldrick@free.fr> | 2012-07-02 18:55:39 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2012-07-02 18:55:39 +0000 |
commit | b2fe7f183d54d7e93880c8a472e0145e13dce070 (patch) | |
tree | d08eca791e03a47d4788cf8f950a46185041331d /lib | |
parent | 5f917cd3fada4507c0f4b718dd6af24b5e7086f1 (diff) |
GlobalOpt forgot to handle bitcast when analyzing globals. Found by inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159546 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/IPO/GlobalOpt.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index 35f98b2265..4e1c23c198 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -254,6 +254,8 @@ static bool AnalyzeGlobal(const Value *V, GlobalStatus &GS, GS.StoredType = GlobalStatus::isStored; } } + } else if (isa<BitCastInst>(I)) { + if (AnalyzeGlobal(I, GS, PHIUsers)) return true; } else if (isa<GetElementPtrInst>(I)) { if (AnalyzeGlobal(I, GS, PHIUsers)) return true; } else if (isa<SelectInst>(I)) { |