llvm-6502/test/LiveVar/phiuse.ll
Vikram S. Adve 190144293d Regression tests for live-variable analysis on machine code
generated by llc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1882 91177308-0d34-0410-b5e6-96231b3b80d8
2002-03-16 21:42:33 +00:00

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