mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 00:11:00 +00:00
190144293d
generated by llc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1882 91177308-0d34-0410-b5e6-96231b3b80d8
31 lines
489 B
LLVM
31 lines
489 B
LLVM
implementation
|
|
|
|
;; Test live variable analysis:
|
|
;; -- phi argument is also used as first class value
|
|
|
|
int "PhiTest"(int %i, int %j)
|
|
begin
|
|
Start:
|
|
%i1 = add int %i, %j
|
|
br label %L1Header
|
|
|
|
L1Header:
|
|
%i2 = phi int [%i1, %Start], [%i4, %L1Header]
|
|
|
|
%i3 = add int %i1, 0
|
|
%i4 = add int %i2, %i3
|
|
%L1Done = setgt int %i4, 10
|
|
br bool %L1Done, label %L1Done, label %L1Header
|
|
|
|
L1Done:
|
|
ret int %i4
|
|
end
|
|
|
|
|
|
int "main"()
|
|
begin
|
|
bb0:
|
|
%result = call int %PhiTest( int 9, int 17 )
|
|
ret int %result
|
|
end
|