brintos

brintos / llvm-project-archived public Read only

0
0
Text · 928 B · 437d814 Raw
49 lines · plain
1# Test that we will not incorrectly take the first basic block in function2# `_foo` as epilogue due to the first load from stack instruction.3 4# RUN: %clang %cflags %s -o %t.so -Wl,-q5# RUN: llvm-bolt %t.so -o %t.bolt --print-cfg | FileCheck %s6 7  .text8  .global _foo9  .type _foo, %function10_foo:11  ldr w8, [sp]12  adr x10, _jmptbl13  ldrsw x9, [x10, x9, lsl #2]14  add x10, x10, x915  br x1016# CHECK-NOT: x10 # TAILCALL17# CHECK: x10 # UNKNOWN CONTROL FLOW18  mov x0, 019  ret20  mov x0, 121  ret22 23  .balign 424_jmptbl:25  .long -1626  .long -827 28  .global _bar29  .type _bar, %function30_bar:31  stp x29, x30, [sp, #-0x10]!32  mov x29, sp33  sub sp, sp, #0x1034  ldr x8, [x29, #0x30]35  blr x836  add sp, sp, #0x1037  ldp x29, x30, [sp], #0x1038  br x239# CHECK-NOT: x2 # UNKNOWN CONTROL FLOW40# CHECK: x2 # TAILCALL41 42  .global _start43  .type _start, %function44_start:45  ret46 47  # Dummy relocation to force relocation mode48  .reloc 0, R_AARCH64_NONE49