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(%class.T* %this, i8* %c) { ret void }
14 define void @e_caller(%class.T* %this, i8* %c) {
15 call void @e_callee(%class.T* %this, i8* %c)
18 ; CHECK-LABEL: e_caller:
22 ; CHECK-FS-LABEL: e_caller:
23 ; CHECK-FS: bl e_callee
27 define void @e_scallee(%class.T* %this, i8* %c) section "different" { ret void }
28 define void @e_scaller(%class.T* %this, i8* %c) {
29 call void @e_scallee(%class.T* %this, i8* %c)
32 ; CHECK-LABEL: e_scaller:
37 define void @e_s2callee(%class.T* %this, i8* %c) { ret void }
38 define void @e_s2caller(%class.T* %this, i8* %c) section "different" {
39 call void @e_s2callee(%class.T* %this, i8* %c)
42 ; CHECK-LABEL: e_s2caller:
43 ; CHECK: bl e_s2callee
50 define void @e_ccallee(%class.T* %this, i8* %c) comdat($cd1) { ret void }
51 define void @e_ccaller(%class.T* %this, i8* %c) comdat($cd2) {
52 call void @e_ccallee(%class.T* %this, i8* %c)
55 ; CHECK-LABEL: e_ccaller:
62 define void @e_c1callee(%class.T* %this, i8* %c) comdat($cd) { ret void }
63 define void @e_c1caller(%class.T* %this, i8* %c) comdat($cd) {
64 call void @e_c1callee(%class.T* %this, i8* %c)
67 ; CHECK-LABEL: e_c1caller:
68 ; CHECK: bl e_c1callee
72 define weak_odr hidden void @wo_hcallee(%class.T* %this, i8* %c) { ret void }
73 define void @wo_hcaller(%class.T* %this, i8* %c) {
74 call void @wo_hcallee(%class.T* %this, i8* %c)
77 ; CHECK-LABEL: wo_hcaller:
78 ; CHECK: bl wo_hcallee
81 ; SCM-LABEL: wo_hcaller:
86 define weak_odr protected void @wo_pcallee(%class.T* %this, i8* %c) { ret void }
87 define void @wo_pcaller(%class.T* %this, i8* %c) {
88 call void @wo_pcallee(%class.T* %this, i8* %c)
91 ; CHECK-LABEL: wo_pcaller:
92 ; CHECK: bl wo_pcallee
95 ; SCM-LABEL: wo_pcaller:
100 define weak_odr void @wo_callee(%class.T* %this, i8* %c) { ret void }
101 define void @wo_caller(%class.T* %this, i8* %c) {
102 call void @wo_callee(%class.T* %this, i8* %c)
105 ; CHECK-LABEL: wo_caller:
106 ; CHECK: bl wo_callee
110 define weak protected void @w_pcallee(i8* %ptr) { ret void }
111 define void @w_pcaller(i8* %ptr) {
112 call void @w_pcallee(i8* %ptr)
115 ; CHECK-LABEL: w_pcaller:
116 ; CHECK: bl w_pcallee
119 ; SCM-LABEL: w_pcaller:
124 define weak hidden void @w_hcallee(i8* %ptr) { ret void }
125 define void @w_hcaller(i8* %ptr) {
126 call void @w_hcallee(i8* %ptr)
129 ; CHECK-LABEL: w_hcaller:
130 ; CHECK: bl w_hcallee
133 ; SCM-LABEL: w_hcaller:
138 define weak void @w_callee(i8* %ptr) { ret void }
139 define void @w_caller(i8* %ptr) {
140 call void @w_callee(i8* %ptr)
143 ; CHECK-LABEL: w_caller: