46 lines · plain
1# This test checks that inlining functions with fused pointer-auth-and-return2# instructions is properly handled by BOLT.3 4# REQUIRES: system-linux5 6# RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown -mattr=+v8.3a %s -o %t.o7# RUN: %clang %cflags -O0 %t.o -o %t.exe -Wl,-q8# RUN: llvm-bolt --inline-all --print-inline --print-only=_Z3barP1A \9# RUN: %t.exe -o %t.bolt | FileCheck %s10 11# CHECK: BOLT-INFO: inlined 0 calls at 1 call sites in 2 iteration(s). Change in binary size: 8 bytes.12# CHECK: Binary Function "_Z3barP1A" after inlining {13# CHECK-NOT: bl _Z3fooP1A14# CHECK: ldr x8, [x0]15# CHECK-NEXT: ldr w0, [x8]16# CHECK-NEXT: autiasp17 18 .text19 .globl _Z3fooP1A20 .type _Z3fooP1A,@function21_Z3fooP1A:22 paciasp23 ldr x8, [x0]24 ldr w0, [x8]25 retaa26 .size _Z3fooP1A, .-_Z3fooP1A27 28 .globl _Z3barP1A29 .type _Z3barP1A,@function30_Z3barP1A:31 stp x29, x30, [sp, #-16]!32 mov x29, sp33 bl _Z3fooP1A34 mul w0, w0, w035 ldp x29, x30, [sp], #1636 ret37 .size _Z3barP1A, .-_Z3barP1A38 39 .globl main40 .p2align 241 .type main,@function42main:43 mov w0, wzr44 ret45 .size main, .-main46