1 // This test checks that the foo function having exclusive memory access
2 // instructions won
't be instrumented.
4 // REQUIRES: system-linux,bolt-runtime,target=aarch64{{.*}}
6 // RUN: llvm-mc -filetype=obj -triple aarch64-unknown-unknown \
8 // RUN: %clang %cflags -fPIC -pie %t.o -o %t.exe -nostdlib -Wl,-q -Wl,-fini=dummy
9 // RUN: llvm-bolt %t.exe -o %t.bolt -instrument -v=2 | FileCheck %s
11 // CHECK: BOLT-INSTRUMENTER: skip BB {{.*}} due to exclusive instruction in function foo
12 // CHECK: BOLT-INSTRUMENTER: skip BB {{.*}} due to exclusive instruction in function foo
13 // CHECK: BOLT-INSTRUMENTER: skip BB {{.*}} due to exclusive instruction in function foo
14 // CHECK: BOLT-INSTRUMENTER: skip BB {{.*}} due to exclusive instruction in function case1
15 // CHECK: BOLT-INSTRUMENTER: skip BB {{.*}} due to exclusive instruction in function case2
16 // CHECK: BOLT-INSTRUMENTER: skip BB {{.*}} due to exclusive instruction in function case2
17 // CHECK: BOLT-INSTRUMENTER: function case3 has exclusive store without corresponding load. Ignoring the function.
18 // CHECK: BOLT-INSTRUMENTER: skip BB {{.*}} due to exclusive instruction in function case4
19 // CHECK: BOLT-INSTRUMENTER: function case4 has two exclusive loads. Ignoring the function.
20 // CHECK: BOLT-INSTRUMENTER: skip BB {{.*}} due to exclusive instruction in function case5
21 // CHECK: BOLT-INSTRUMENTER: function case5 has exclusive load in trailing BB. Ignoring the function.
26 # exclusive load and store in two bbs
37 .type _start, %function
51 .size _start, .-_start
53 # Case 1: exclusive load and store in one basic block
55 .type case1, %function
64 # Case 2: exclusive load and store in different blocks
66 .type case2, %function
80 # Case 3: store without preceding load
82 .type case3, %function
88 # Case 4: two exclusive load instructions in neighboring blocks
90 .type case4, %function
103 # Case 5: Exclusive load without successor
105 .type case5, %function
112 .type dummy, %function