Debian Codegraph @

llvm/test/CodeGen/PowerPC/ppc64-blnop.ll

raw
1 ; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s
2 ; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s
3 ; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s
4 ; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s
5 ; RUN: llc < %s -relocation-model=pic -function-sections -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=CHECK-FS
6 ; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s
7 ; RUN: llc < %s -relocation-model=pic -function-sections -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s -check-prefix=CHECK-FS
8 ; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
9 ; RUN: -code-model=small -mcpu=pwr8 | FileCheck %s -check-prefix=SCM
10
11 %class.T = type { [2 x i8] }
12
13 define void @e_callee(ptr %this, ptr %c) { ret void }
14 define void @e_caller(ptr %this, ptr %c) {
15 call void @e_callee(ptr %this, ptr %c)
16 ret void
17
18 ; CHECK-LABEL: e_caller:
19 ; CHECK: bl e_callee
20 ; CHECK-NEXT: nop
21
22 ; CHECK-FS-LABEL: e_caller:
23 ; CHECK-FS: bl e_callee
24 ; CHECK-FS-NEXT: nop
25 }
26
27 define void @e_scallee(ptr %this, ptr %c) section "different" { ret void }
28 define void @e_scaller(ptr %this, ptr %c) {
29 call void @e_scallee(ptr %this, ptr %c)
30 ret void
31
32 ; CHECK-LABEL: e_scaller:
33 ; CHECK: bl e_scallee
34 ; CHECK-NEXT: nop
35 }
36
37 define void @e_s2callee(ptr %this, ptr %c) { ret void }
38 define void @e_s2caller(ptr %this, ptr %c) section "different" {
39 call void @e_s2callee(ptr %this, ptr %c)
40 ret void
41
42 ; CHECK-LABEL: e_s2caller:
43 ; CHECK: bl e_s2callee
44 ; CHECK-NEXT: nop
45 }
46
47 $cd1 = comdat any
48 $cd2 = comdat any
49
50 define void @e_ccallee(ptr %this, ptr %c) comdat($cd1) { ret void }
51 define void @e_ccaller(ptr %this, ptr %c) comdat($cd2) {
52 call void @e_ccallee(ptr %this, ptr %c)
53 ret void
54
55 ; CHECK-LABEL: e_ccaller:
56 ; CHECK: bl e_ccallee
57 ; CHECK-NEXT: nop
58 }
59
60 $cd = comdat any
61
62 define void @e_c1callee(ptr %this, ptr %c) comdat($cd) { ret void }
63 define void @e_c1caller(ptr %this, ptr %c) comdat($cd) {
64 call void @e_c1callee(ptr %this, ptr %c)
65 ret void
66
67 ; CHECK-LABEL: e_c1caller:
68 ; CHECK: bl e_c1callee
69 ; CHECK-NEXT: nop
70 }
71
72 define weak_odr hidden void @wo_hcallee(ptr %this, ptr %c) { ret void }
73 define void @wo_hcaller(ptr %this, ptr %c) {
74 call void @wo_hcallee(ptr %this, ptr %c)
75 ret void
76
77 ; CHECK-LABEL: wo_hcaller:
78 ; CHECK: bl wo_hcallee
79 ; CHECK-NEXT: nop
80
81 ; SCM-LABEL: wo_hcaller:
82 ; SCM: bl wo_hcallee
83 ; SCM-NEXT: nop
84 }
85
86 define weak_odr protected void @wo_pcallee(ptr %this, ptr %c) { ret void }
87 define void @wo_pcaller(ptr %this, ptr %c) {
88 call void @wo_pcallee(ptr %this, ptr %c)
89 ret void
90
91 ; CHECK-LABEL: wo_pcaller:
92 ; CHECK: bl wo_pcallee
93 ; CHECK-NEXT: nop
94
95 ; SCM-LABEL: wo_pcaller:
96 ; SCM: bl wo_pcallee
97 ; SCM-NEXT: nop
98 }
99
100 define weak_odr void @wo_callee(ptr %this, ptr %c) { ret void }
101 define void @wo_caller(ptr %this, ptr %c) {
102 call void @wo_callee(ptr %this, ptr %c)
103 ret void
104
105 ; CHECK-LABEL: wo_caller:
106 ; CHECK: bl wo_callee
107 ; CHECK-NEXT: nop
108 }
109
110 define weak protected void @w_pcallee(ptr %ptr) { ret void }
111 define void @w_pcaller(ptr %ptr) {
112 call void @w_pcallee(ptr %ptr)
113 ret void
114
115 ; CHECK-LABEL: w_pcaller:
116 ; CHECK: bl w_pcallee
117 ; CHECK-NEXT: nop
118
119 ; SCM-LABEL: w_pcaller:
120 ; SCM: bl w_pcallee
121 ; SCM-NEXT: nop
122 }
123
124 define weak hidden void @w_hcallee(ptr %ptr) { ret void }
125 define void @w_hcaller(ptr %ptr) {
126 call void @w_hcallee(ptr %ptr)
127 ret void
128
129 ; CHECK-LABEL: w_hcaller:
130 ; CHECK: bl w_hcallee
131 ; CHECK-NEXT: nop
132
133 ; SCM-LABEL: w_hcaller:
134 ; SCM: bl w_hcallee
135 ; SCM-NEXT: nop
136 }
137
138 define weak void @w_callee(ptr %ptr) { ret void }
139 define void @w_caller(ptr %ptr) {
140 call void @w_callee(ptr %ptr)
141 ret void
142
143 ; CHECK-LABEL: w_caller:
144 ; CHECK: bl w_callee
145 ; CHECK-NEXT: nop
146 }
147