1 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
2 ; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names < %s \
3 ; RUN: | FileCheck %s --check-prefix=CHECK-S
4 ; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
5 ; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names --filetype=obj < %s | \
6 ; RUN: llvm-objdump -dr - | FileCheck %s --check-prefix=CHECK-O
7 ; RUN: llc -verify-machineinstrs -target-abi=elfv2 -mtriple=powerpc64-- \
8 ; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names < %s \
9 ; RUN: | FileCheck %s --check-prefix=CHECK-S
10 ; RUN: llc -verify-machineinstrs -target-abi=elfv2 -mtriple=powerpc64-- \
11 ; RUN: -mcpu=pwr10 -ppc-asm-full-reg-names --filetype=obj < %s | \
12 ; RUN: llvm-objdump -dr - | FileCheck %s --check-prefix=CHECK-O
15 ; CHECK-S-LABEL: caller
16 ; CHECK-S: b callee@notoc
18 ; CHECK-O-LABEL: caller
20 ; CHECK-O-NEXT: R_PPC64_REL24_NOTOC callee
21 define dso_local signext i32 @caller() local_unnamed_addr {
23 %call = tail call signext i32 @callee()
27 declare signext i32 @callee(...) local_unnamed_addr
30 ; Some calls can be considered Extrnal Symbols.
31 ; CHECK-S-LABEL: ExternalSymbol
32 ; CHECK-S: b memcpy@notoc
34 ; CHECK-O-LABEL: ExternalSymbol
36 ; CHECK-O-NEXT: R_PPC64_REL24_NOTOC memcpy
37 define dso_local void @ExternalSymbol(ptr nocapture %out, ptr nocapture readonly %in, i64 %num) local_unnamed_addr {
39 tail call void @llvm.memcpy.p0.p0.i64(ptr align 1 %out, ptr align 1 %in, i64 %num, i1 false)
43 declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg)
46 ; CHECK-S-LABEL: callerNoTail
47 ; CHECK-S: bl callee@notoc
49 ; CHECK-S: bl callee@notoc
53 ; CHECK-O-LABEL: callerNoTail
55 ; CHECK-O-NEXT: R_PPC64_REL24_NOTOC callee
58 ; CHECK-O-NEXT: R_PPC64_REL24_NOTOC callee
61 define dso_local signext i32 @callerNoTail() local_unnamed_addr {
63 %call1 = tail call signext i32 @callee()
64 %call2 = tail call signext i32 @callee()
65 %add = add i32 %call1, %call2