39 lines · plain
1## This test checks that for AArch64 binaries with BTI, we do not inline blocks with indirect tailcalls.2 3# REQUIRES: system-linux4 5# RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown %s -o %t.o6# RUN: %clang %cflags -O0 %t.o -o %t.exe -Wl,-q -Wl,-z,force-bti7# RUN: llvm-bolt --inline-all %t.exe -o %t.bolt | FileCheck %s8 9# For BTI, we should not inline foo.10# CHECK-NOT: BOLT-INFO: inlined {{[0-9]+}} calls at {{[0-9]+}} call sites in {{[0-9]+}} iteration(s). Change in binary size: {{[0-9]+}} bytes.11 12 .text13 .globl _Z3fooP1A14 .type _Z3fooP1A,@function15_Z3fooP1A:16 ldr x8, [x0]17 ldr w0, [x8]18 br x3019 .size _Z3fooP1A, .-_Z3fooP1A20 21 .globl _Z3barP1A22 .type _Z3barP1A,@function23_Z3barP1A:24 stp x29, x30, [sp, #-16]!25 mov x29, sp26 bl _Z3fooP1A27 mul w0, w0, w028 ldp x29, x30, [sp], #1629 ret30 .size _Z3barP1A, .-_Z3barP1A31 32 .globl main33 .p2align 234 .type main,@function35main:36 mov w0, wzr37 ret38 .size main, .-main39