annotate test/Assembler/ifunc-use-list-order.ll @ 122:36195a0db682

merging ( incomplete )
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Fri, 17 Nov 2017 20:32:31 +0900
parents 1172e4bd9c6f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
120
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
1 ; RUN: verify-uselistorder < %s
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
2
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
3 ; Global referencing ifunc.
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
4 @ptr_foo = global void ()* @foo_ifunc
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
5
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
6 ; Alias for ifunc.
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
7 @alias_foo = alias void (), void ()* @foo_ifunc
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
8
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
9 @foo_ifunc = ifunc void (), i8* ()* @foo_resolver
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
10
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
11 define i8* @foo_resolver() {
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
12 entry:
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
13 ret i8* null
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
14 }
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
15
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
16 ; Function referencing ifunc.
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
17 define void @bar() {
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
18 entry:
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
19 call void @foo_ifunc()
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
20 ret void
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
21 }
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
22
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
23 ; Global referencing function.
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
24 @ptr_bar = global void ()* @bar
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
25
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
26 ; Alias for function.
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
27 @alias_bar = alias void (), void ()* @bar
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
28
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
29 @bar_ifunc = ifunc void (), i8* ()* @bar2_ifunc
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
30 @bar2_ifunc = ifunc i8* (), i8* ()* @bar_resolver
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
31
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
32 define i8* @bar_resolver() {
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
33 entry:
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
34 ret i8* null
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
35 }
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
36
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
37 ; Function referencing bar.
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
38 define void @bar2() {
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
39 entry:
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
40 call void @bar()
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
41 ret void
1172e4bd9c6f update 4.0.0
mir3636
parents:
diff changeset
42 }