mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-23 04:16:42 +00:00
GlobalOpt forgot to handle bitcast when analyzing globals. Found by inspection.
llvm-svn: 159546
This commit is contained in:
parent
23eb3ecf32
commit
16235b1885
@ -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)) {
|
||||
|
@ -26,7 +26,9 @@ define i1 @bah(i64 %i) nounwind readonly optsize ssp {
|
||||
entry:
|
||||
%arrayidx4 = getelementptr inbounds [4 x i8]* @d, i64 0, i64 %i
|
||||
%tmp5 = load i8* %arrayidx4, align 1
|
||||
%cmp = icmp eq i8 %tmp5, 42
|
||||
%array0 = bitcast [4 x i8]* @d to i8*
|
||||
%tmp6 = load i8* %array0, align 1
|
||||
%cmp = icmp eq i8 %tmp5, %tmp6
|
||||
ret i1 %cmp
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user