[BOLT][AArch64] Strip uneeded labels from FEAT_CMPBR tests. (#189931)

Eliminates the temporary labels so that BOLT does not recognize them as
secondary entry points.
This commit is contained in:
Alexandros Lamprineas 2026-04-02 10:16:41 +01:00 committed by GitHub
parent d835dd2b43
commit 4c9a739c5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 14 deletions

View File

@ -7,6 +7,7 @@
# RUN: %clang %cflags -march=armv9-a+cmpbr -Wl,-q %s -o %t
# RUN: link_fdata --no-lbr %s %t %t.fdata
# RUN: llvm-strip --strip-unneeded %t
# RUN: llvm-bolt -v=1 %t -o %t.bolt --data %t.fdata --reorder-blocks=ext-tsp --compact-code-model \
# RUN: | FileCheck %s --check-prefix=BOLT-INFO
# RUN: llvm-objdump -d %t.bolt | FileCheck %s
@ -30,10 +31,8 @@ immediate_increment:
# CHECK: <immediate_increment>:
# CHECK-NEXT: {{.*}} cblt x0, #0x1, 0x[[ADDR0:[0-9a-f]+]] <{{.*}}>
# CHECK: <.exit0>:
# CHECK-NEXT: {{.*}} mov x0, #0x2 // =2
# CHECK-NEXT: {{.*}} ret
# CHECK: <.cold0>:
# CHECK-NEXT: [[ADDR0]]: {{.*}} mov x0, #0x1 // =1
# CHECK-NEXT: {{.*}} ret
@ -54,10 +53,8 @@ immediate_decrement:
# CHECK: <immediate_decrement>:
# CHECK-NEXT: {{.*}} cbhi x0, #0x0, 0x[[ADDR1:[0-9a-f]+]] <{{.*}}>
# CHECK: <.exit1>:
# CHECK-NEXT: {{.*}} mov x0, #0x2 // =2
# CHECK-NEXT: {{.*}} ret
# CHECK: <.cold1>:
# CHECK-NEXT: [[ADDR1]]: {{.*}} mov x0, #0x1 // =1
# CHECK-NEXT: {{.*}} ret
@ -78,10 +75,8 @@ register_swap:
# CHECK: <register_swap>:
# CHECK-NEXT: {{.*}} cbgt x1, x0, 0x[[ADDR2:[0-9a-f]+]] <{{.*}}>
# CHECK: <.exit2>:
# CHECK-NEXT: {{.*}} mov x0, #0x2 // =2
# CHECK-NEXT: {{.*}} ret
# CHECK: <.cold2>:
# CHECK-NEXT: [[ADDR2]]: {{.*}} mov x0, #0x1 // =1
# CHECK-NEXT: {{.*}} ret
@ -105,10 +100,8 @@ irreversible:
# CHECK: <irreversible>:
# CHECK-NEXT: {{.*}} cbgt x0, #0x3f, 0x[[ADDR3:[0-9a-f]+]] <{{.*}}>
# CHECK-NEXT: {{.*}} b 0x[[ADDR4:[0-9a-f]+]] <{{.*}}>
# CHECK: <.exit3>:
# CHECK-NEXT: [[ADDR3]]: {{.*}} mov x0, #0x2 // =2
# CHECK-NEXT: {{.*}} ret
# CHECK: <.cold3>:
# CHECK-NEXT: [[ADDR4]]: {{.*}} mov x0, #0x1 // =1
# CHECK-NEXT: {{.*}} ret

View File

@ -6,16 +6,19 @@
# RUN: %clang %cflags -march=armv9-a+cmpbr -Wl,-q %s -o %t -DNUM_NOPS=0 -DIMM=0
# RUN: link_fdata --no-lbr %s %t %t.fdata
# RUN: llvm-strip --strip-unneeded %t
# RUN: llvm-bolt %t -o %t.bolt --data %t.fdata --reorder-blocks=ext-tsp --compact-code-model
# RUN: llvm-objdump -d %t.bolt | FileCheck %s
# RUN: %clang %cflags -march=armv9-a+cmpbr -Wl,-q %s -o %t -DNUM_NOPS=256 -DIMM=0
# RUN: link_fdata --no-lbr %s %t %t.fdata
# RUN: llvm-strip --strip-unneeded %t
# RUN: llvm-bolt %t -o %t.bolt --data %t.fdata --reorder-blocks=ext-tsp --compact-code-model --keep-nops
# RUN: llvm-objdump -d %t.bolt | FileCheck %s --check-prefix=BEYOND-1KB
# RUN: %clang %cflags -march=armv9-a+cmpbr -Wl,-q %s -o %t -DNUM_NOPS=256 -DIMM=63
# RUN: link_fdata --no-lbr %s %t %t.fdata
# RUN: llvm-strip --strip-unneeded %t
# RUN: llvm-bolt %t -o %t.bolt --data %t.fdata --reorder-blocks=ext-tsp --compact-code-model --keep-nops
# RUN: llvm-objdump -d %t.bolt | FileCheck %s --check-prefix=BEYOND-1KB-IRREVERSIBLE
@ -47,10 +50,8 @@ reorder_blocks:
# CHECK: <reorder_blocks>:
# CHECK-NEXT: {{.*}} cbgt x0, #0x0, 0x[[ADDR:[0-9a-f]+]] <{{.*}}>
# CHECK: <.hot_exit>:
# CHECK-NEXT: {{.*}} mov x0, #0x2 // =2
# CHECK-NEXT: {{.*}} ret
# CHECK: <.cold_exit>:
# CHECK-NEXT: [[ADDR]]: {{.*}} mov x0, #0x1 // =1
# CHECK-NEXT: {{.*}} ret
@ -59,11 +60,9 @@ reorder_blocks:
# BEYOND-1KB: <reorder_blocks>:
# BEYOND-1KB-NEXT: {{.*}} cblt x0, #0x1, 0x[[ADDR0:[0-9a-f]+]] <{{.*}}>
# BEYOND-1KB-NEXT: {{.*}} b 0x[[ADDR1:[0-9a-f]+]] <{{.*}}>
# BEYOND-1KB: <.hot_exit>:
# BEYOND-1KB-NEXT: [[ADDR0]]: {{.*}} nop
# BEYOND-1KB: {{.*}} mov x0, #0x2 // =2
# BEYOND-1KB-NEXT: {{.*}} ret
# BEYOND-1KB: <.cold_exit>:
# BEYOND-1KB-NEXT: [[ADDR1]]: {{.*}} mov x0, #0x1 // =1
# BEYOND-1KB-NEXT: {{.*}} ret
@ -73,10 +72,8 @@ reorder_blocks:
# BEYOND-1KB-IRREVERSIBLE-NEXT: {{.*}} cbgt x0, #0x3f, 0x[[ADDR0:[0-9a-f]+]] <{{.*}}>
# BEYOND-1KB-IRREVERSIBLE-NEXT: {{.*}} b 0x[[ADDR1:[0-9a-f]+]] <{{.*}}>
# BEYOND-1KB-IRREVERSIBLE-NEXT: [[ADDR0]]: {{.*}} b 0x[[ADDR2:[0-9a-f]+]] <{{.*}}>
# BEYOND-1KB-IRREVERSIBLE: <.hot_exit>:
# BEYOND-1KB-IRREVERSIBLE-NEXT: [[ADDR1]]: {{.*}} nop
# BEYOND-1KB-IRREVERSIBLE: {{.*}} mov x0, #0x2 // =2
# BEYOND-1KB-IRREVERSIBLE-NEXT: {{.*}} ret
# BEYOND-1KB-IRREVERSIBLE: <.cold_exit>:
# BEYOND-1KB-IRREVERSIBLE-NEXT: [[ADDR2]]: {{.*}} mov x0, #0x1 // =1
# BEYOND-1KB-IRREVERSIBLE-NEXT: {{.*}} ret

View File

@ -6,16 +6,19 @@
# RUN: %clang %cflags -march=armv9-a+cmpbr -Wl,-q %s -o %t -DNUM_NOPS=0 -DRESERVE_SPACE=0
# RUN: link_fdata --no-lbr %s %t %t.fdata
# RUN: llvm-strip --strip-unneeded %t
# RUN: llvm-bolt %t -o %t.bolt --data %t.fdata -split-functions --compact-code-model
# RUN: llvm-objdump -d %t.bolt | FileCheck %s
# RUN: %clang %cflags -march=armv9-a+cmpbr -Wl,-q %s -o %t -DNUM_NOPS=256 -DRESERVE_SPACE=0
# RUN: link_fdata --no-lbr %s %t %t.fdata
# RUN: llvm-strip --strip-unneeded %t
# RUN: llvm-bolt %t -o %t.bolt --data %t.fdata -split-functions --compact-code-model --keep-nops
# RUN: llvm-objdump -d %t.bolt | FileCheck %s
# RUN: %clang %cflags -march=armv9-a+cmpbr -Wl,-q %s -o %t -DNUM_NOPS=0 -DRESERVE_SPACE=1
# RUN: link_fdata --no-lbr %s %t %t.fdata
# RUN: llvm-strip --strip-unneeded %t
# RUN: not llvm-bolt %t -o %t.bolt --data %t.fdata -split-functions --compact-code-model 2>&1 \
# RUN: | FileCheck %s --check-prefix=BEYOND-128MB

View File

@ -5,16 +5,19 @@
# RUN: %clang %cflags -march=armv9-a+cmpbr -Wl,-q %s -o %t -DNUM_NOPS=0 -DRESERVE_SPACE=0
# RUN: link_fdata --no-lbr %s %t %t.fdata
# RUN: llvm-strip --strip-unneeded %t
# RUN: not llvm-bolt %t -o %t.bolt --data %t.fdata -split-functions 2>&1 \
# RUN: | FileCheck %s
# RUN: %clang %cflags -march=armv9-a+cmpbr -Wl,-q %s -o %t -DNUM_NOPS=256 -DRESERVE_SPACE=0
# RUN: link_fdata --no-lbr %s %t %t.fdata
# RUN: llvm-strip --strip-unneeded %t
# RUN: not llvm-bolt %t -o %t.bolt --data %t.fdata -split-functions --keep-nops 2>&1 \
# RUN: | FileCheck %s
# RUN: %clang %cflags -march=armv9-a+cmpbr -Wl,-q %s -o %t -DNUM_NOPS=0 -DRESERVE_SPACE=1
# RUN: link_fdata --no-lbr %s %t %t.fdata
# RUN: llvm-strip --strip-unneeded %t
# RUN: not llvm-bolt %t -o %t.bolt --data %t.fdata -split-functions 2>&1 \
# RUN: | FileCheck %s