mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
New testcase for bug never checked into CVS, but that I hit during debugging a
new feature git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4039 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7d821db958
commit
41a29f2b6f
35
test/Transforms/CorrelatedExprs/2002-10-04-ForwardingBug.ll
Normal file
35
test/Transforms/CorrelatedExprs/2002-10-04-ForwardingBug.ll
Normal 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*, ...)
|
Loading…
Reference in New Issue
Block a user