| 1 |
; RUN: llc -fast-isel=false -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 -fast-isel=false -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 (...), ptr @oldname |
| 7 |
|
| 8 |
; Function Attrs: noinline nounwind optnone |
| 9 |
define dso_local signext i32 @oldname() #0 { |
| 10 |
entry: |
| 11 |
ret i32 55 |
| 12 |
} |
| 13 |
|
| 14 |
; Function Attrs: noinline nounwind optnone |
| 15 |
define 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 |
| 24 |
entry: |
| 25 |
%call = call signext i32 @newname() |
| 26 |
ret i32 %call |
| 27 |
} |
| 28 |
|
| 29 |
; Function Attrs: noinline nounwind optnone -pcrelative-memops |
| 30 |
; This caller does not use PC Relative memops |
| 31 |
define 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 |
| 40 |
entry: |
| 41 |
%call = call signext i32 @newname() |
| 42 |
ret i32 %call |
| 43 |
} |
| 44 |
|
| 45 |
attributes #0 = { noinline nounwind optnone } |
| 46 |
attributes #1 = { noinline nounwind optnone "target-features"="-pcrelative-memops" } |