blob: bb39ab1000684c070b01070f93f2d8a2b90cea9b [file] [log] [blame]
Reid Spencerc0948362007-01-16 18:08:22 +00001; RUN: llvm-as %s -o - | llvm-dis > %t1.ll
2; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll
3; RUN: diff %t1.ll %t2.ll
4
5%FunTy = type i31(i31)
6
7implementation
8
9define void "invoke"(%FunTy *%x)
10begin
11 %foo = call %FunTy* %x(i31 123)
12 ret void
13end
14
15define i31 "main"(i31 %argc, i8 **%argv, i8 **%envp)
16begin
17 %retval = call i31 (i31) *%test(i31 %argc)
18 %two = add i31 %retval, %retval
19 %retval2 = call i31 %test(i31 %argc)
20
21 %two2 = add i31 %two, %retval2
22 call void %invoke (%FunTy* %test)
23 ret i31 %two2
24end
25
26define i31 "test"(i31 %i0)
27begin
28 ret i31 %i0
29end