xref: /llvm-project/bolt/test/X86/jump-table-pic-order.test (revision 11791ae7b0b05b8bd8d806331ff51da618912cf8)
1## Check that successors of a basic block with jump table are generated
2## in the same order as they appear in the input code.
3
4RUN: %clang %cflags %S/Inputs/jump-table-pic.s -o %t.exe -Wl,-q
5RUN: llvm-bolt %t.exe --strict --print-cfg --print-only=main -o %t.null \
6RUN:   | FileCheck %s
7
8CHECK:      BB Layout   : {{.*, .*, .*,}} [[BB4to6:.*, .*, .*]]
9
10## Check that successors appear in the order matching the input layout.
11CHECK:      jmpq    *%rax # JUMPTABLE
12CHECK-NEXT: Successors: [[BB4to6]]
13