48 lines · plain
1## This test checks that inline is properly handled by BOLT on aarch64.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,-q7# RUN: llvm-bolt --inline-small-functions --print-inline --print-only=test \8# RUN: %t.exe -o %t.bolt | FileCheck %s9 10#CHECK: BOLT-INFO: inlined 0 calls at 1 call sites in 2 iteration(s). Change in binary size: 4 bytes.11#CHECK: Binary Function "test" after inlining {12#CHECK-NOT: bl indirect13#CHECK: add w0, w1, w014#CHECK-NEXT: blr x215 16 .text17 .globl indirect 18 .type indirect,@function19indirect: 20 add w0, w1, w021 br x222 .size indirect, .-indirect23 24 .globl test 25 .type test,@function26test: 27 stp x29, x30, [sp, #-32]! 28 stp x20, x19, [sp, #16] 29 mov x29, sp30 mov w19, w131 mov w20, w032 bl indirect33 add w8, w19, w2034 cmp w0, #035 csinc w0, w8, wzr, eq36 ldp x20, x19, [sp, #16] 37 ldp x29, x30, [sp], #32 38 ret39 .size test, .-test40 41 .globl main 42 .type main,@function43main: 44 mov w0, wzr45 ret46 .size main, .-main47 48