2024-05-31 15:14:37 -07:00
|
|
|
## Check that successors of a basic block with jump table are generated
|
|
|
|
## in the same order as they appear in the input code.
|
2022-02-14 10:37:20 -08:00
|
|
|
|
|
|
|
RUN: %clang %cflags %S/Inputs/jump-table-pic.s -o %t.exe -Wl,-q
|
2023-11-27 10:53:18 -08:00
|
|
|
RUN: llvm-bolt %t.exe --strict --print-cfg --print-only=main -o %t.null \
|
2022-02-14 10:37:20 -08:00
|
|
|
RUN: | FileCheck %s
|
|
|
|
|
|
|
|
CHECK: BB Layout : {{.*, .*, .*,}} [[BB4to6:.*, .*, .*]]
|
|
|
|
|
2024-05-31 15:14:37 -07:00
|
|
|
## Check that successors appear in the order matching the input layout.
|
2022-02-14 10:37:20 -08:00
|
|
|
CHECK: jmpq *%rax # JUMPTABLE
|
|
|
|
CHECK-NEXT: Successors: [[BB4to6]]
|