|
21 | 21 | # RUN: --print-cfg --print-only=main | FileCheck %s --check-prefix=CHECK3 |
22 | 22 |
|
23 | 23 | ## Check fallthrough to a landing pad case. |
24 | | -# RUN: llvm-bolt %t.exe --pa -p %t.pa3 -o %t.out4 --enable-bat \ |
| 24 | +# RUN: llvm-bolt %t.exe --pa -p %t.pa3 -o %t.out4 \ |
25 | 25 | # RUN: --print-cfg --print-only=main | FileCheck %s --check-prefix=CHECK3 |
26 | 26 |
|
27 | | -## Check that a landing pad is emitted in BAT |
28 | | -# RUN: llvm-bat-dump %t.out4 --dump-all | FileCheck %s --check-prefix=CHECK-BAT |
| 27 | +# RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown --defsym GLOBL=1 \ |
| 28 | +# RUN: %s -o %t.o |
| 29 | +# RUN: %clangxx %cxxflags %t.o -o %t2 -Wl,-q -nostdlib |
| 30 | +# RUN: llvm-bolt %t2 --pa -p %t.pa3 -o %t.bat --enable-bat \ |
| 31 | +# RUN: --print-cfg --print-only=main | FileCheck %s --check-prefix=CHECK3 |
29 | 32 |
|
30 | | -# CHECK-BAT: 1 secondary entry points: |
| 33 | +## Check that a landing pad is emitted in BAT |
| 34 | +# RUN: llvm-bat-dump %t.bat --dump-all | FileCheck %s --check-prefix=CHECK-BAT |
31 | 35 |
|
32 | | -## Check BAT case of a fallthrough to a call continuation |
33 | | -# link_fdata %s %t.out4 %t.pa.bat PREAGG |
34 | | -# RUN: perf2bolt %t.out4 -p %t.pa.bat --pa -o %t.fdata |
35 | | -# RUN: FileCheck %s --check-prefix=CHECK-BAT-CC --input-file=%t.fdata |
36 | | -# CHECK-BAT-CC: main |
| 36 | +# CHECK-BAT: secondary entry points: |
37 | 37 |
|
38 | 38 | ## Check BAT case of a fallthrough to a secondary entry point or a landing pad |
39 | | -# link_fdata %s %t.out4 %t.pa.bat2 PREAGG3 |
| 39 | +# RUN: link_fdata %s %t.bat %t.pa.bat2 PREAGG3 |
40 | 40 |
|
41 | 41 | ## Secondary entry |
42 | | -# RUN: perf2bolt %t.out4 -p %t.pa.bat2 --pa -o %t.fdata2 |
| 42 | +# RUN: perf2bolt %t.bat -p %t.pa.bat2 --pa -o %t.fdata2 |
43 | 43 | # RUN: FileCheck %s --check-prefix=CHECK-BAT-ENTRY --input-file=%t.fdata2 |
44 | 44 | # CHECK-BAT-ENTRY: main |
45 | 45 |
|
46 | 46 | ## Landing pad |
47 | | -# RUN: llvm-strip --strip-unneeded %t.out4 |
48 | | -# RUN: perf2bolt %t.out4 -p %t.pa.bat2 --pa -o %t.fdata3 |
| 47 | +# RUN: llvm-strip --strip-unneeded %t.bat |
| 48 | +# RUN: perf2bolt %t.bat -p %t.pa.bat2 --pa -o %t.fdata3 |
49 | 49 | # RUN: FileCheck %s --check-prefix=CHECK-BAT-LP --input-file=%t.fdata3 |
50 | 50 | # CHECK-BAT-LP: main |
51 | 51 |
|
| 52 | +## Check BAT case of a fallthrough to a call continuation |
| 53 | +# link_fdata %s %t.bat %t.pa.bat PREAGG |
| 54 | +# RUN: perf2bolt %t.bat -p %t.pa.bat --pa -o %t.fdata |
| 55 | +# RUN: FileCheck %s --check-prefix=CHECK-BAT-CC --input-file=%t.fdata |
| 56 | +# CHECK-BAT-CC: main |
| 57 | + |
52 | 58 | .globl foo |
53 | 59 | .type foo, %function |
54 | 60 | foo: |
@@ -107,6 +113,9 @@ Ltmp4: |
107 | 113 | # CHECK3: callq foo |
108 | 114 | # CHECK3-NEXT: count: 0 |
109 | 115 |
|
| 116 | +.ifdef GLOBL |
| 117 | +.globl Ltmp3 |
| 118 | +.endif |
110 | 119 | Ltmp3: |
111 | 120 | cmpl $0x0, -0x18(%rbp) |
112 | 121 | Ltmp3_br: |
|
0 commit comments