1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

New testcase for bug never checked into CVS, but that I hit during debugging a

new feature

llvm-svn: 4039
This commit is contained in:
Chris Lattner 2002-10-04 23:29:40 +00:00
parent a923b0f49f
commit 75e143a29e

View File

@ -0,0 +1,35 @@
; Testcase distilled from bisort where we tried to perform branch target
; forwarding where it was not safe.
; RUN: as < %s | opt -cee
;
%HANDLE = type { int, %HANDLE*, %HANDLE* }
%struct.node = type { int, %HANDLE*, %HANDLE* }
%.LC0 = internal global [11 x sbyte] c"%d @ 0x%x\0A\00" ; <[11 x sbyte]*> [#uses=1]
implementation ; Functions:
void %InOrder(%HANDLE* %h) {
bb0: ; No predecessors!
br label %bb2
bb2: ; preds = %bb3, %bb0
%reg113 = phi %HANDLE* [ %reg109, %bb3 ], [ %h, %bb0 ] ; <%HANDLE*> [#uses=4]
%cond217 = seteq %HANDLE* %reg113, null ; <bool> [#uses=1]
br bool %cond217, label %bb4, label %bb3
bb3: ; preds = %bb2
%reg221 = getelementptr %HANDLE* %reg113, long 0, ubyte 1 ; <%HANDLE**> [#uses=1]
%reg108 = load %HANDLE** %reg221 ; <%HANDLE*> [#uses=1]
%reg226 = getelementptr %HANDLE* %reg113, long 0, ubyte 2 ; <%HANDLE**> [#uses=1]
%reg109 = load %HANDLE** %reg226 ; <%HANDLE*> [#uses=1]
call void %InOrder( %HANDLE* %reg108 )
%cast231 = getelementptr %HANDLE* %reg113, long 0, ubyte 0 ; <int*> [#uses=1]
%reg111 = load int* %cast231 ; <int> [#uses=1]
%reg233 = call int (sbyte*, ...)* %printf( sbyte* getelementptr ([11 x sbyte]* %.LC0, long 0, long 0), int %reg111, uint 0 ) ; <int> [#uses=0]
br label %bb2
bb4: ; preds = %bb2
ret void
}
declare int %printf(sbyte*, ...)