18 lines · plain
1// Verify that PLTCall optimization works.2 3RUN: %clang %cflags -fpic -shared -xc /dev/null -o %t.so4// Link against a DSO to ensure PLT entries.5RUN: %clang %cflags %p/../Inputs/plt-tailcall.c %t.so \6RUN: -o %t -Wl,-q7RUN: llvm-bolt %t -o %t.bolt --plt=all --print-plt --print-only=foo | FileCheck %s8 9// Call to printf10CHECK: adrp x16, printf@GOT11CHECK: ldr x17, [x16, :lo12:printf@GOT]12CHECK: blr x17 # PLTCall: 113 14// Call to puts, that was tail-call optimized15CHECK: adrp x16, puts@GOT16CHECK: ldr x17, [x16, :lo12:puts@GOT]17CHECK: br x17 # TAILCALL # PLTCall: 118