mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 04:39:44 +00:00
Testcase for new bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1797 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
41b66b12e8
commit
664c953b39
26
test/Other/2002-02-24-InlineBrokePHINodes.ll
Normal file
26
test/Other/2002-02-24-InlineBrokePHINodes.ll
Normal file
@ -0,0 +1,26 @@
|
||||
; Inlining used to break PHI nodes. This tests that they are correctly updated
|
||||
; when a node is split around the call instruction. The verifier caught the error.
|
||||
;
|
||||
; RUN: as < %s | opt -inline -verify
|
||||
;
|
||||
implementation
|
||||
|
||||
ulong "test"(ulong %X)
|
||||
begin
|
||||
ret ulong %X
|
||||
end
|
||||
|
||||
ulong "fib"(ulong %n)
|
||||
begin
|
||||
%T = setlt ulong %n, 2 ; {bool}:0
|
||||
br bool %T, label %BaseCase, label %RecurseCase
|
||||
|
||||
RecurseCase:
|
||||
%result = call ulong %test(ulong %n)
|
||||
br label %BaseCase
|
||||
|
||||
BaseCase:
|
||||
%X = phi ulong [1, %0], [2, %RecurseCase]
|
||||
ret ulong %X
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user