mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-25 16:31:33 +00:00
Fix an error where ANTIC_OUT was ending up with more than one expression of
the same value number. This fixes an infinite loop on 444.namd. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37967 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8f5149e002
commit
36a07daabd
@ -1370,7 +1370,7 @@ unsigned GVNPRE::buildsets_anticin(BasicBlock* BB,
|
||||
unsigned num = VN.lookup_or_add(*I);
|
||||
numbers.resize(VN.size());
|
||||
|
||||
if (isa<Instruction>(*I)) {
|
||||
if (isa<Instruction>(*I) && !numbers.test(num)) {
|
||||
anticIn.insert(*I);
|
||||
numbers.set(num);
|
||||
}
|
||||
|
14
test/Transforms/GVNPRE/2007-07-07-AnticOutUnique.ll
Normal file
14
test/Transforms/GVNPRE/2007-07-07-AnticOutUnique.ll
Normal file
@ -0,0 +1,14 @@
|
||||
; RUN: llvm-as < %s | opt -gvnpre | llvm-dis
|
||||
%"struct.ObjectArena<char>" = type { i32, i32, %"struct.ResizeArray<char*>", i8*, i8* }
|
||||
%"struct.ResizeArray<char*>" = type { i32 (...)**, %"struct.ResizeArrayRaw<char*>"* }
|
||||
%"struct.ResizeArrayRaw<char*>" = type { i8**, i8*, i32, i32, i32, float, i32 }
|
||||
|
||||
define void @_ZN11ObjectArenaIcED1Ev(%"struct.ObjectArena<char>"* %this) {
|
||||
entry:
|
||||
br label %cond_true21
|
||||
|
||||
cond_true21: ; preds = %cond_true21, %entry
|
||||
%tmp215.0 = phi %"struct.ResizeArray<char*>"* [ null, %entry ], [ null, %cond_true21 ] ; <%"struct.ResizeArray<char*>"*> [#uses=1]
|
||||
%tmp2.i2 = getelementptr %"struct.ResizeArray<char*>"* %tmp215.0, i32 0, i32 1 ; <%"struct.ResizeArrayRaw<char*>"**> [#uses=0]
|
||||
br label %cond_true21
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user