1; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
2; RUN:   -mcpu=pwr9 -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefix=P9
3; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu \
4; RUN:   -mcpu=pwr10 -ppc-asm-full-reg-names < %s | FileCheck %s --check-prefix=P10
5
6@newname = dso_local alias i32 (...), bitcast (i32 ()* @oldname to i32 (...)*)
7
8; Function Attrs: noinline nounwind optnone
9define dso_local signext i32 @oldname() #0 {
10entry:
11  ret i32 55
12}
13
14; Function Attrs: noinline nounwind optnone
15define dso_local signext i32 @caller() #0 {
16; #P9-LABEL: caller
17; #P9:       bl newname
18; #P9-NOT:   nop
19; #P9:       blr
20; #P10-LABEL: caller
21; #P10:       bl newname@notoc
22; #P10-NOT:   nop
23; #P10:       blr
24entry:
25  %call = call signext i32 bitcast (i32 (...)* @newname to i32 ()*)()
26  ret i32 %call
27}
28
29; Function Attrs: noinline nounwind optnone -pcrelative-memops
30; This caller does not use PC Relative memops
31define dso_local signext i32 @caller_nopcrel() #1 {
32; #P9-LABEL: caller_nopcrel
33; #P9:       bl newname
34; #P9-NOT:   nop
35; #P9:       blr
36; #P10-LABEL: caller_nopcrel
37; #P10:       bl newname
38; #P10-NEXT:  nop
39; #P10:       blr
40entry:
41  %call = call signext i32 bitcast (i32 (...)* @newname to i32 ()*)()
42  ret i32 %call
43}
44
45attributes #0 = { noinline nounwind optnone }
46attributes #1 = { noinline nounwind optnone "target-features"="-pcrelative-memops" }
47