• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llvm-as < %s | 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 i32 (i32)
6
7define void @invoke(%FunTy* %x) {
8        %foo = call i32 %x( i32 123 )           ; <i32> [#uses=0]
9        ret void
10}
11
12define i32 @main(i32 %argc, i8** %argv, i8** %envp) {
13        %retval = call i32 @test( i32 %argc )           ; <i32> [#uses=2]
14        %two = add i32 %retval, %retval         ; <i32> [#uses=1]
15        %retval2 = call i32 @test( i32 %argc )          ; <i32> [#uses=1]
16        %two2 = add i32 %two, %retval2          ; <i32> [#uses=1]
17        call void @invoke( %FunTy* @test )
18        ret i32 %two2
19}
20
21define i32 @test(i32 %i0) {
22        ret i32 %i0
23}
24
25