1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/test/LiveVar/phiuse.ll
Vikram S. Adve e801dabfc7 Regression tests for live-variable analysis on machine code
generated by llc.

llvm-svn: 1882
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