[llvm] [BOLT][AArch64] Support block reordering beyond 1KB for FEAT_CMPBR. (PR #185443)

via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 9 08:29:15 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 623 tests passed
* 54 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### BOLT
<details>
<summary>BOLT.AArch64/compare-and-branch-reorder-blocks.S</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 6
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang  --target=x86_64-unknown-linux-gnu -fPIE -fuse-ld=lld -Wl,--unresolved-symbols=ignore-all -Wl,--build-id=none -pie -mllvm -x86-asm-syntax=att --target=aarch64-unknown-linux-gnu -nostartfiles -nostdlib -ffreestanding -Wl,-z,defs -march=armv9-a+cmpbr -Wl,-q /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/compare-and-branch-reorder-blocks.S -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp -DNUM_NOPS=0
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang --target=x86_64-unknown-linux-gnu -fPIE -fuse-ld=lld -Wl,--unresolved-symbols=ignore-all -Wl,--build-id=none -pie -mllvm -x86-asm-syntax=att --target=aarch64-unknown-linux-gnu -nostartfiles -nostdlib -ffreestanding -Wl,-z,defs -march=armv9-a+cmpbr -Wl,-q /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/compare-and-branch-reorder-blocks.S -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp -DNUM_NOPS=0
# .---command stderr------------
# | ld.lld: warning: cannot find entry symbol _start; not setting start address
# `-----------------------------
# RUN: at line 7
/usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/link_fdata.py --no-lbr /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/compare-and-branch-reorder-blocks.S /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp.fdata
# executed command: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/link_fdata.py --no-lbr /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/compare-and-branch-reorder-blocks.S /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp.fdata
# note: command had no output on stdout or stderr
# RUN: at line 8
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-bolt --runtime-instrumentation-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_instr.a --runtime-hugify-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_hugify.a /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp.bolt --data /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp.fdata --reorder-blocks=ext-tsp --compact-code-model
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-bolt --runtime-instrumentation-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_instr.a --runtime-hugify-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_hugify.a /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp.bolt --data /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp.fdata --reorder-blocks=ext-tsp --compact-code-model
# .---command stdout------------
# | BOLT-INFO: shared object or position-independent executable detected
# | BOLT-INFO: Target architecture: aarch64
# | BOLT-INFO: BOLT version: 02cd7f4d41f9508706b4aa6ea4372b2474a90df8
# | BOLT-INFO: first alloc address is 0x0
# | BOLT-INFO: creating new program header table at address 0x200000, offset 0x200000
# | BOLT-INFO: enabling relocation mode
# | BOLT-INFO: pre-processing profile using branch profile reader
# | BOLT-INFO: operating with basic samples profiling data (no brstack).
# | BOLT-INFO: number of removed linker-inserted veneers: 0
# | BOLT-INFO: 1 out of 1 functions in the binary (100.0%) have non-empty execution profile
# | BOLT-INFO: profile quality metrics for the hottest 1 functions (reporting top 5% values): function CFG discontinuity 0.00%; call graph flow conservation gap 100.00%; CFG flow conservation gap 0.00% (weighted) 0.00% (worst); exception handling usage 0.00% (of total BBEC) 0.00% (of total InvokeEC)
# | BOLT-INFO: basic block reordering modified layout of 1 functions (100.00% of profiled, 100.00% of total)
# | BOLT-INFO: 0 Functions were reordered by LoopInversionPass
# | BOLT-INFO: relaxing branches for compact code model (<128MB)
# | BOLT-WARNING: Running parallel work of 0 estimated cost, will switch to  trivial scheduling.
# | BOLT-INFO: rewritten pac-ret DWARF info in 0 out of 1 functions (0.00%).
# `-----------------------------
# .---command stderr------------
# | BOLT-INFO: no .got section found
# `-----------------------------
# RUN: at line 9
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-objdump -d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp.bolt | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/compare-and-branch-reorder-blocks.S
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-objdump -d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp.bolt
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/compare-and-branch-reorder-blocks.S
# note: command had no output on stdout or stderr
# RUN: at line 11
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang  --target=x86_64-unknown-linux-gnu -fPIE -fuse-ld=lld -Wl,--unresolved-symbols=ignore-all -Wl,--build-id=none -pie -mllvm -x86-asm-syntax=att --target=aarch64-unknown-linux-gnu -nostartfiles -nostdlib -ffreestanding -Wl,-z,defs -march=armv9-a+cmpbr -Wl,-q /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/compare-and-branch-reorder-blocks.S -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp -DNUM_NOPS=256
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang --target=x86_64-unknown-linux-gnu -fPIE -fuse-ld=lld -Wl,--unresolved-symbols=ignore-all -Wl,--build-id=none -pie -mllvm -x86-asm-syntax=att --target=aarch64-unknown-linux-gnu -nostartfiles -nostdlib -ffreestanding -Wl,-z,defs -march=armv9-a+cmpbr -Wl,-q /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/compare-and-branch-reorder-blocks.S -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp -DNUM_NOPS=256
# .---command stderr------------
# | ld.lld: warning: cannot find entry symbol _start; not setting start address
# `-----------------------------
# RUN: at line 12
/usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/link_fdata.py --no-lbr /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/compare-and-branch-reorder-blocks.S /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp.fdata
# executed command: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/link_fdata.py --no-lbr /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/compare-and-branch-reorder-blocks.S /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp.fdata
# note: command had no output on stdout or stderr
# RUN: at line 13
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-bolt --runtime-instrumentation-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_instr.a --runtime-hugify-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_hugify.a /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp.bolt --data /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp.fdata --reorder-blocks=ext-tsp --compact-code-model --keep-nops
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-bolt --runtime-instrumentation-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_instr.a --runtime-hugify-lib=/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/bolt_rt-bins/lib/libbolt_rt_hugify.a /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp.bolt --data /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp.fdata --reorder-blocks=ext-tsp --compact-code-model --keep-nops
# .---command stdout------------
# | BOLT-INFO: shared object or position-independent executable detected
# | BOLT-INFO: Target architecture: aarch64
# | BOLT-INFO: BOLT version: 02cd7f4d41f9508706b4aa6ea4372b2474a90df8
# | BOLT-INFO: first alloc address is 0x0
# | BOLT-INFO: creating new program header table at address 0x200000, offset 0x200000
# | BOLT-INFO: enabling relocation mode
# | BOLT-INFO: pre-processing profile using branch profile reader
# | BOLT-INFO: operating with basic samples profiling data (no brstack).
# | BOLT-INFO: number of removed linker-inserted veneers: 0
# | BOLT-INFO: 1 out of 1 functions in the binary (100.0%) have non-empty execution profile
# | BOLT-INFO: profile quality metrics for the hottest 1 functions (reporting top 5% values): function CFG discontinuity 0.00%; call graph flow conservation gap 100.00%; CFG flow conservation gap 0.00% (weighted) 0.00% (worst); exception handling usage 0.00% (of total BBEC) 0.00% (of total InvokeEC)
# | BOLT-INFO: basic block reordering modified layout of 1 functions (100.00% of profiled, 100.00% of total)
# | BOLT-INFO: 0 Functions were reordered by LoopInversionPass
# | BOLT-INFO: relaxing branches for compact code model (<128MB)
# | BOLT-WARNING: Running parallel work of 0 estimated cost, will switch to  trivial scheduling.
# | BOLT-INFO: rewritten pac-ret DWARF info in 0 out of 1 functions (0.00%).
# `-----------------------------
# .---command stderr------------
# | BOLT-INFO: no .got section found
# `-----------------------------
# RUN: at line 14
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-objdump -d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp.bolt | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/compare-and-branch-reorder-blocks.S --check-prefix=BEYOND-1KB
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llvm-objdump -d /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/bolt/test/AArch64/Output/compare-and-branch-reorder-blocks.S.tmp.bolt
# note: command had no output on stdout or stderr
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/compare-and-branch-reorder-blocks.S --check-prefix=BEYOND-1KB
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/compare-and-branch-reorder-blocks.S:56:20: error: BEYOND-1KB-NEXT: is not on the line after the previous match
# | # BEYOND-1KB-NEXT: [[ADDR0]]: {{.*}} nop
# |                    ^
# | <stdin>:277:2: note: 'next' match was here
# |  400008: d503201f nop
# |  ^
# | <stdin>:274:42: note: previous match ended here
# |  400004: 14000103 b 0x400410 <.cold_exit>
# |                                          ^
# | <stdin>:275:1: note: non-matching line after previous match is here
# | 
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/bolt/test/AArch64/compare-and-branch-reorder-blocks.S
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |          .
# |          .
# |          .
# |        272: 0000000000400000 <reorder_blocks>: 
# |        273:  400000: f5208040 cblt x0, #0x1, 0x400008 <.hot_exit> 
# |        274:  400004: 14000103 b 0x400410 <.cold_exit> 
# |        275:  
# |        276: 0000000000400008 <.hot_exit>: 
# |        277:  400008: d503201f nop 
# | next:56      !~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |        278:  40000c: d503201f nop 
# |        279:  400010: d503201f nop 
# |        280:  400014: d503201f nop 
# |        281:  400018: d503201f nop 
# |        282:  40001c: d503201f nop 
# |          .
# |          .
# |          .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/185443


More information about the llvm-commits mailing list