blob: 0b26859b04c73c14809359132deea4c87744b8a3 [file] [log] [blame]
Dan Gohman0cb2f672009-09-11 18:36:27 +00001; RUN: llc < %s -mtriple=i686-pc-linux-gnu -asm-verbose=false -o %t
Anton Korobeynikov00ab4902008-03-11 21:42:20 +00002; RUN: grep set %t | count 7
3; RUN: grep globl %t | count 6
Dan Gohman552fb262007-08-15 13:49:33 +00004; RUN: grep weak %t | count 1
Anton Korobeynikov00ab4902008-03-11 21:42:20 +00005; RUN: grep hidden %t | count 1
6; RUN: grep protected %t | count 1
Dan Gohmanf17a25c2007-07-18 16:29:46 +00007
8@bar = external global i32
9@foo1 = alias i32* @bar
10@foo2 = alias i32* @bar
11
12%FunTy = type i32()
13
14declare i32 @foo_f()
15@bar_f = alias weak %FunTy* @foo_f
16
17@bar_i = alias internal i32* @bar
18
19@A = alias bitcast (i32* @bar to i64*)
20
Anton Korobeynikov00ab4902008-03-11 21:42:20 +000021@bar_h = hidden alias i32* @bar
22
23@bar_p = protected alias i32* @bar
24
Dan Gohmanf17a25c2007-07-18 16:29:46 +000025define i32 @test() {
26entry:
27 %tmp = load i32* @foo1
28 %tmp1 = load i32* @foo2
29 %tmp0 = load i32* @bar_i
30 %tmp2 = call i32 @foo_f()
31 %tmp3 = add i32 %tmp, %tmp2
32 %tmp4 = call %FunTy* @bar_f()
33 %tmp5 = add i32 %tmp3, %tmp4
34 %tmp6 = add i32 %tmp1, %tmp5
35 %tmp7 = add i32 %tmp6, %tmp0
36 ret i32 %tmp7
37}