mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-11 08:07:22 +00:00
2393a24fed
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17533 91177308-0d34-0410-b5e6-96231b3b80d8
31 lines
746 B
LLVM
31 lines
746 B
LLVM
; RUN: llvm-as -f %s -o - | llc
|
|
|
|
implementation
|
|
|
|
int "main"()
|
|
begin
|
|
bb0:
|
|
%reg109 = malloc int, uint 100
|
|
br label %bb2
|
|
|
|
bb2:
|
|
%cann-indvar1 = phi int [ 0, %bb0 ], [ %add1-indvar1, %bb2 ]
|
|
%reg127 = mul int %cann-indvar1, 2
|
|
%add1-indvar1 = add int %cann-indvar1, 1
|
|
store int 999, int * %reg109
|
|
%cond1015 = setle int 1, 99
|
|
%reg128 = add int %reg127, 2
|
|
br bool %cond1015, label %bb2, label %bb4
|
|
|
|
bb4: ;[#uses=3]
|
|
%cann-indvar = phi uint [ %add1-indvar, %bb4 ], [ 0, %bb2 ]
|
|
%add1-indvar = add uint %cann-indvar, 1 ; <uint> [#uses=1]
|
|
store int 333, int * %reg109
|
|
%reg131 = add uint %add1-indvar, 3 ; <int> [#uses=1]
|
|
%cond1017 = setle uint %reg131, 99 ; <bool> [#uses=1]
|
|
br bool %cond1017, label %bb4, label %bb5
|
|
|
|
bb5:
|
|
ret int 0
|
|
end
|