blob: 3578c96c65c3d69b1f228ed2301baf50f31c6b0e [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; RUN: llvm-as < %s | \
2; RUN: llc -mtriple=i686-pc-linux-gnu -o %t -f
Anton Korobeynikov00ab4902008-03-11 21:42:20 +00003; RUN: grep set %t | count 7
4; RUN: grep globl %t | count 6
Dan Gohman552fb262007-08-15 13:49:33 +00005; RUN: grep weak %t | count 1
Anton Korobeynikov00ab4902008-03-11 21:42:20 +00006; RUN: grep hidden %t | count 1
7; RUN: grep protected %t | count 1
Dan Gohmanf17a25c2007-07-18 16:29:46 +00008
9@bar = external global i32
10@foo1 = alias i32* @bar
11@foo2 = alias i32* @bar
12
13%FunTy = type i32()
14
15declare i32 @foo_f()
16@bar_f = alias weak %FunTy* @foo_f
17
18@bar_i = alias internal i32* @bar
19
20@A = alias bitcast (i32* @bar to i64*)
21
Anton Korobeynikov00ab4902008-03-11 21:42:20 +000022@bar_h = hidden alias i32* @bar
23
24@bar_p = protected alias i32* @bar
25
Dan Gohmanf17a25c2007-07-18 16:29:46 +000026define i32 @test() {
27entry:
28 %tmp = load i32* @foo1
29 %tmp1 = load i32* @foo2
30 %tmp0 = load i32* @bar_i
31 %tmp2 = call i32 @foo_f()
32 %tmp3 = add i32 %tmp, %tmp2
33 %tmp4 = call %FunTy* @bar_f()
34 %tmp5 = add i32 %tmp3, %tmp4
35 %tmp6 = add i32 %tmp1, %tmp5
36 %tmp7 = add i32 %tmp6, %tmp0
37 ret i32 %tmp7
38}