148 lines · plain
1; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s2; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s3; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s4; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s5; RUN: llc < %s -relocation-model=pic -function-sections -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu | FileCheck %s -check-prefix=CHECK-FS6; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s7; RUN: llc < %s -relocation-model=pic -function-sections -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s -check-prefix=CHECK-FS8; RUN: llc < %s -relocation-model=pic -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \9; RUN: -code-model=small -mcpu=pwr8 | FileCheck %s -check-prefix=SCM10 11%class.T = type { [2 x i8] }12 13define void @e_callee(ptr %this, ptr %c) { ret void }14define void @e_caller(ptr %this, ptr %c) {15 call void @e_callee(ptr %this, ptr %c)16 ret void17 18; CHECK-LABEL: e_caller:19; CHECK: bl e_callee20; CHECK-NEXT: nop21 22; CHECK-FS-LABEL: e_caller:23; CHECK-FS: bl e_callee24; CHECK-FS-NEXT: nop25}26 27define void @e_scallee(ptr %this, ptr %c) section "different" { ret void }28define void @e_scaller(ptr %this, ptr %c) {29 call void @e_scallee(ptr %this, ptr %c)30 ret void31 32; CHECK-LABEL: e_scaller:33; CHECK: bl e_scallee34; CHECK-NEXT: nop35}36 37define void @e_s2callee(ptr %this, ptr %c) { ret void }38define void @e_s2caller(ptr %this, ptr %c) section "different" {39 call void @e_s2callee(ptr %this, ptr %c)40 ret void41 42; CHECK-LABEL: e_s2caller:43; CHECK: bl e_s2callee44; CHECK-NEXT: nop45}46 47$cd1 = comdat any48$cd2 = comdat any49 50define void @e_ccallee(ptr %this, ptr %c) comdat($cd1) { ret void }51define void @e_ccaller(ptr %this, ptr %c) comdat($cd2) {52 call void @e_ccallee(ptr %this, ptr %c)53 ret void54 55; CHECK-LABEL: e_ccaller:56; CHECK: bl e_ccallee57; CHECK-NEXT: nop58}59 60$cd = comdat any61 62define void @e_c1callee(ptr %this, ptr %c) comdat($cd) { ret void }63define void @e_c1caller(ptr %this, ptr %c) comdat($cd) {64 call void @e_c1callee(ptr %this, ptr %c)65 ret void66 67; CHECK-LABEL: e_c1caller:68; CHECK: bl e_c1callee69; CHECK-NEXT: nop70}71 72define weak_odr hidden void @wo_hcallee(ptr %this, ptr %c) { ret void }73define void @wo_hcaller(ptr %this, ptr %c) {74 call void @wo_hcallee(ptr %this, ptr %c)75 ret void76 77; CHECK-LABEL: wo_hcaller:78; CHECK: bl wo_hcallee79; CHECK-NEXT: nop80 81; SCM-LABEL: wo_hcaller:82; SCM: bl wo_hcallee83; SCM-NEXT: nop84}85 86define weak_odr protected void @wo_pcallee(ptr %this, ptr %c) { ret void }87define void @wo_pcaller(ptr %this, ptr %c) {88 call void @wo_pcallee(ptr %this, ptr %c)89 ret void90 91; CHECK-LABEL: wo_pcaller:92; CHECK: bl wo_pcallee93; CHECK-NEXT: nop94 95; SCM-LABEL: wo_pcaller:96; SCM: bl wo_pcallee97; SCM-NEXT: nop98}99 100define weak_odr void @wo_callee(ptr %this, ptr %c) { ret void }101define void @wo_caller(ptr %this, ptr %c) {102 call void @wo_callee(ptr %this, ptr %c)103 ret void104 105; CHECK-LABEL: wo_caller:106; CHECK: bl wo_callee107; CHECK-NEXT: nop108}109 110define weak protected void @w_pcallee(ptr %ptr) { ret void }111define void @w_pcaller(ptr %ptr) {112 call void @w_pcallee(ptr %ptr)113 ret void114 115; CHECK-LABEL: w_pcaller:116; CHECK: bl w_pcallee117; CHECK-NEXT: nop118 119; SCM-LABEL: w_pcaller:120; SCM: bl w_pcallee121; SCM-NEXT: nop122}123 124define weak hidden void @w_hcallee(ptr %ptr) { ret void }125define void @w_hcaller(ptr %ptr) {126 call void @w_hcallee(ptr %ptr)127 ret void128 129; CHECK-LABEL: w_hcaller:130; CHECK: bl w_hcallee131; CHECK-NEXT: nop132 133; SCM-LABEL: w_hcaller:134; SCM: bl w_hcallee135; SCM-NEXT: nop136}137 138define weak void @w_callee(ptr %ptr) { ret void }139define void @w_caller(ptr %ptr) {140 call void @w_callee(ptr %ptr)141 ret void142 143; CHECK-LABEL: w_caller:144; CHECK: bl w_callee145; CHECK-NEXT: nop146}147 148