[clang][test] Fix SemaCXX/msvc-pragma-function-no-builtin-attr.cpp for x86 (#119986)
[llvm-project.git] / bolt / test / X86 / issue20.s
blob9645eaf2e6223469a56d0e5dbc813fa3ff94c5e5
1 ## This reproduces issue 20 from our github repo
2 ## "BOLT crashes when removing unreachable BBs that are a target
3 ## in a JT"
5 # REQUIRES: system-linux
7 # RUN: llvm-mc -filetype=obj -triple x86_64-unknown-unknown \
8 # RUN: %s -o %t.o
9 # RUN: %clang %cflags -no-pie %t.o -o %t.exe
10 # RUN: llvm-bolt %t.exe --relocs=0 --jump-tables=move --print-finalized \
11 # RUN: -o %t.out | FileCheck %s
13 # CHECK-NOT: BOLT-INFO: UCE removed {{.*}} blocks and {{.*}} bytes of code
14 # CHECK: Binary Function "main"
15 # CHECK: .LFT{{.*}} (2 instructions, align : 1)
16 # CHECK-NEXT: 00000004: andq
17 # CHECK-NEXT: 00000008: jmpq
18 # CHECK-NEXT: Successors: .Ltmp{{.*}}, .Ltmp{{.*}}, .Ltmp{{.*}}, .Ltmp{{.*}}
21 .text
22 .globl main
23 .type main, %function
24 .size main, .Lend1-main
25 main:
26 xorq %rax, %rax
27 retq
28 andq $3, %rdi
29 jmpq *jumptbl(,%rdi,8)
31 .Lbb1:
32 movl $0x1, %eax
33 jmp .Lexit
34 .Lbb2:
35 movl $0x2, %eax
36 jmp .Lexit
37 .Lbb3:
38 movl $0x3, %eax
39 jmp .Lexit
40 .Lbb4:
41 movl $0x4, %eax
42 .Lexit:
43 retq
44 .Lend1:
46 .section .rodata
47 .globl jumptbl
48 jumptbl:
49 .quad .Lbb1
50 .quad .Lbb2
51 .quad .Lbb3
52 .quad .Lbb4