mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-02 08:46:37 +00:00
69ccadd753
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32115 91177308-0d34-0410-b5e6-96231b3b80d8
26 lines
462 B
LLVM
26 lines
462 B
LLVM
; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll
|
|
; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
|
|
; RUN: diff %t1.ll %t2.ll
|
|
|
|
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
|
|
|