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
11 %class.T = type { [2 x i8] }
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)
18 ; CHECK-LABEL: e_caller:
22 ; CHECK-FS-LABEL: e_caller:
23 ; CHECK-FS: bl e_callee
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)
32 ; CHECK-LABEL: e_scaller:
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)
42 ; CHECK-LABEL: e_s2caller:
43 ; CHECK: bl e_s2callee
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)
55 ; CHECK-LABEL: e_ccaller:
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)
67 ; CHECK-LABEL: e_c1caller:
68 ; CHECK: bl e_c1callee
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)
77 ; CHECK-LABEL: wo_hcaller:
78 ; CHECK: bl wo_hcallee
81 ; SCM-LABEL: wo_hcaller:
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)
91 ; CHECK-LABEL: wo_pcaller:
92 ; CHECK: bl wo_pcallee
95 ; SCM-LABEL: wo_pcaller:
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)
105 ; CHECK-LABEL: wo_caller:
106 ; CHECK: bl wo_callee
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)
115 ; CHECK-LABEL: w_pcaller:
116 ; CHECK: bl w_pcallee
119 ; SCM-LABEL: w_pcaller:
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)
129 ; CHECK-LABEL: w_hcaller:
130 ; CHECK: bl w_hcallee
133 ; SCM-LABEL: w_hcaller:
138 define weak void @w_callee(ptr %ptr) { ret void }
139 define void @w_caller(ptr %ptr) {
140 call void @w_callee(ptr %ptr)
143 ; CHECK-LABEL: w_caller: