Instcombine x-((x/y)*y) into a remainder operator.
[oota-llvm.git] / test / Feature / forwardreftest.ll
1 ; RUN: llvm-upgrade < %s | llvm-as | llvm-dis > %t1.ll
2 ; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3 ; RUN: diff %t1.ll %t2.ll
4
5   %myty = type int 
6   %myfn = type float (int,double,uint,short)
7   type int(%myfn*)
8   type int(int)
9   type int(int(int)*)
10
11   %thisfuncty = type int (int) *
12 implementation
13
14 declare void %F(%thisfuncty, %thisfuncty, %thisfuncty)
15
16 ; This function always returns zero
17 int %zarro(int %Func)
18 begin
19 Startup:
20     add int 0, 10
21     ret int 0 
22 end
23
24 int %test(int) 
25 begin
26     call void %F(%thisfuncty %zarro, %thisfuncty %test, %thisfuncty %foozball)
27     ret int 0
28 end
29
30 int %foozball(int)
31 begin
32     ret int 0
33 end
34