mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-22 07:32:48 +00:00
69ccadd753
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32115 91177308-0d34-0410-b5e6-96231b3b80d8
21 lines
327 B
LLVM
21 lines
327 B
LLVM
; RUN: llvm-upgrade < %s | llvm-as | opt -licm | lli
|
|
|
|
implementation ; Functions:
|
|
|
|
int %main() {
|
|
entry:
|
|
br label %Loop
|
|
|
|
Loop:
|
|
br bool true, label %LoopCont, label %Out
|
|
LoopCont:
|
|
%X = add int 1, 0
|
|
br bool true, label %Out, label %Loop
|
|
|
|
Out:
|
|
%V = phi int [ 2, %Loop], [ %X, %LoopCont]
|
|
%V2 = sub int %V, 1
|
|
ret int %V2
|
|
}
|
|
|