[llvm-branch-commits] [llvm] [LV] capture branch weights for constant trip counts (PR #175096)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Jan 15 14:33:04 PST 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 168096 tests passed
* 2993 tests skipped
* 2 tests failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.Transforms/LoopVectorize/AArch64/check-prof-info.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes="print<block-freq>,loop-vectorize" -mcpu=neoverse-v1 -force-vector-interleave=1 -S < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/AArch64/check-prof-info.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/AArch64/check-prof-info.ll -check-prefix=CHECK-V1-IC1
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt '-passes=print<block-freq>,loop-vectorize' -mcpu=neoverse-v1 -force-vector-interleave=1 -S
# .---command stderr------------
# | Printing analysis results of BFI for function 'foo_i32':
# | block-frequency-info: foo_i32
# | - entry: float = 1.0, int = 17592186044416
# | - for.body: float = 1024.0, int = 18014398509481984
# | - for.cond.cleanup: float = 1.0, int = 17592186044416
# |
# | Printing analysis results of BFI for function 'foo_i8':
# | block-frequency-info: foo_i8
# | - entry: float = 1.0, int = 17592186044416
# | - for.body: float = 1024.0, int = 18014398509481984
# | - for.cond.cleanup: float = 1.0, int = 17592186044416
# |
# | Printing analysis results of BFI for function 'foo_i32_no_bw':
# | block-frequency-info: foo_i32_no_bw
# | - entry: float = 1.0, int = 562949953421312
# | - for.body: float = 32.0, int = 18014398509481984
# | - for.cond.cleanup: float = 1.0, int = 562949953421312
# |
# `-----------------------------
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/AArch64/check-prof-info.ll -check-prefix=CHECK-V1-IC1
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/AArch64/check-prof-info.ll:135:17: error: CHECK-V1-IC1: expected string not found in input
# | ; CHECK-V1-IC1: br i1 [[TMP9:%.*]], label %[[VEC_EPILOG_MIDDLE_BLOCK:.*]], label %[[VEC_EPILOG_VECTOR_BODY]], !llvm.loop [[LOOP13:![0-9]+]]
# | ^
# | <stdin>:97:24: note: scanning from here
# | vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph
# | ^
# | <stdin>:97:24: note: with "VEC_EPILOG_VECTOR_BODY" equal to "vec.epilog.vector.body"
# | vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph
# | ^
# | <stdin>:123:31: note: possible intended match here
# | br i1 %exitcond, label %for.cond.cleanup, label %for.body, !prof !6, !llvm.loop !16
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/AArch64/check-prof-info.ll:351:17: error: CHECK-V1-IC1: expected string not found in input
# | ; CHECK-V1-IC1: [[META8]] = !{!"llvm.loop.estimated_trip_count", i32 0}
# | ^
# | <stdin>:188:32: note: scanning from here
# | !7 = distinct !{!7, !3, !2, !8}
# | ^
# | <stdin>:188:32: note: with "META8" equal to "!8"
# | !7 = distinct !{!7, !3, !2, !8}
# | ^
# | <stdin>:195:3: note: possible intended match here
# | !14 = !{!"llvm.loop.estimated_trip_count", i32 0}
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/AArch64/check-prof-info.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | .
# | .
# | .
# | 92: %vec.epilog.resume.val = phi i64 [ %n.vec, %vec.epilog.iter.check ], [ 0, %vector.main.loop.iter.check ]
# | 93: %n.mod.vf2 = urem i64 %n, 16
# | 94: %n.vec3 = sub i64 %n, %n.mod.vf2
# | 95: br label %vec.epilog.vector.body
# | 96:
# | 97: vec.epilog.vector.body: ; preds = %vec.epilog.vector.body, %vec.epilog.ph
# | check:135'0 X~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# | check:135'1 with "VEC_EPILOG_VECTOR_BODY" equal to "vec.epilog.vector.body"
# | 98: %index4 = phi i64 [ %vec.epilog.resume.val, %vec.epilog.ph ], [ %index.next6, %vec.epilog.vector.body ]
# | check:135'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 99: %7 = getelementptr inbounds [1024 x i8], ptr @b, i64 0, i64 %index4
# | check:135'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 100: %wide.load5 = load <16 x i8>, ptr %7, align 1
# | check:135'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 101: %8 = getelementptr inbounds [1024 x i8], ptr @a, i64 0, i64 %index4
# | check:135'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 102: store <16 x i8> %wide.load5, ptr %8, align 1
# | check:135'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | .
# | .
# | .
# | 118: %load = load i8, ptr %arrayidx, align 1
# | check:135'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 119: %arrayidx2 = getelementptr inbounds [1024 x i8], ptr @a, i64 0, i64 %iv
# | check:135'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 120: store i8 %load, ptr %arrayidx2, align 1
# | check:135'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 121: %iv.next = add nuw nsw i64 %iv, 1
# | check:135'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 122: %exitcond = icmp eq i64 %iv.next, %n
# | check:135'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 123: br i1 %exitcond, label %for.cond.cleanup, label %for.body, !prof !6, !llvm.loop !16
# | check:135'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:135'2 ? possible intended match
# | 124:
# | check:135'0 ~
# | 125: for.cond.cleanup: ; preds = %vec.epilog.middle.block, %middle.block, %for.body
# | check:135'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 126: ret void
# | check:135'0 ~~~~~~~~~~
# | 127: }
# | check:135'0 ~~
# | 128:
# | check:135'0 ~
# | .
# | .
# | .
# | 183: !2 = !{!"llvm.loop.isvectorized", i32 1}
# | 184: !3 = !{!"llvm.loop.unroll.runtime.disable"}
# | 185: !4 = !{!"llvm.loop.estimated_trip_count", i32 128}
# | 186: !5 = !{!"branch_weights", i32 1, i32 7}
# | 187: !6 = !{!"branch_weights", i32 1, i32 0}
# | 188: !7 = distinct !{!7, !3, !2, !8}
# | check:351'0 X error: no match found
# | check:351'1 with "META8" equal to "!8"
# | 189: !8 = !{!"llvm.loop.estimated_trip_count", i32 1}
# | check:351'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 190: !9 = !{!"branch_weights", i32 1, i32 31}
# | check:351'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 191: !10 = distinct !{!10, !2, !3, !11}
# | check:351'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 192: !11 = !{!"llvm.loop.estimated_trip_count", i32 32}
# | check:351'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 193: !12 = !{!"branch_weights", i32 16, i32 16}
# | check:351'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 194: !13 = distinct !{!13, !2, !3, !14}
# | check:351'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 195: !14 = !{!"llvm.loop.estimated_trip_count", i32 0}
# | check:351'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:351'2 ? possible intended match
# | 196: !15 = !{!"branch_weights", i32 1, i32 15}
# | check:351'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 197: !16 = distinct !{!16, !3, !2, !8}
# | check:351'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 198: !17 = distinct !{!17, !2, !3}
# | check:351'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | 199: !18 = distinct !{!18, !3, !2}
# | check:351'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
<details>
<summary>LLVM.Transforms/PGOProfile/profcheck-select.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 5
split-file /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/PGOProfile/profcheck-select.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test/Transforms/PGOProfile/Output/profcheck-select.ll.tmp
# executed command: split-file /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/PGOProfile/profcheck-select.ll /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test/Transforms/PGOProfile/Output/profcheck-select.ll.tmp
# note: command had no output on stdout or stderr
# RUN: at line 7
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=prof-inject /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test/Transforms/PGOProfile/Output/profcheck-select.ll.tmp/inject.ll -S -o - | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test/Transforms/PGOProfile/Output/profcheck-select.ll.tmp/inject.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=prof-inject /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test/Transforms/PGOProfile/Output/profcheck-select.ll.tmp/inject.ll -S -o -
# 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/build/test/Transforms/PGOProfile/Output/profcheck-select.ll.tmp/inject.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test/Transforms/PGOProfile/Output/profcheck-select.ll.tmp/inject.ll:14:10: error: CHECK: expected string not found in input
# | ; CHECK: %v = select i1 %c, i32 1, i32 2, !prof !1
# | ^
# | <stdin>:6:17: note: scanning from here
# | define void @bar(i1 %c) !prof !0 {
# | ^
# | <stdin>:7:2: note: possible intended match here
# | %v = select i1 %c, i32 1, i32 2
# | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test/Transforms/PGOProfile/Output/profcheck-select.ll.tmp/inject.ll:18:10: error: CHECK: expected string not found in input
# | ; CHECK: !1 = !{!"branch_weights", i32 2, i32 3}
# | ^
# | <stdin>:17:42: note: scanning from here
# | !0 = !{!"function_entry_count", i64 1000}
# | ^
# |
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/test/Transforms/PGOProfile/Output/profcheck-select.ll.tmp/inject.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '/home/gha/actions-runner/_work/llvm-project/llvm-project/build/test/Transforms/PGOProfile/Output/profcheck-select.ll.tmp/inject.ll'
# | 2: source_filename = "/home/gha/actions-runner/_work/llvm-project/llvm-project/build/test/Transforms/PGOProfile/Output/profcheck-select.ll.tmp/inject.ll"
# | 3:
# | 4: declare void @foo(i32)
# | 5:
# | 6: define void @bar(i1 %c) !prof !0 {
# | check:14'0 X~~~~~~~~~~~~~~~~~~ error: no match found
# | 7: %v = select i1 %c, i32 1, i32 2
# | check:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | check:14'1 ? possible intended match
# | 8: call void @foo(i32 %v)
# | check:14'0 ~~~~~~~~~~~~~~~~~~~~~~~~
# | 9: ret void
# | check:14'0 ~~~~~~~~~~
# | 10: }
# | check:14'0 ~~
# | 11:
# | check:14'0 ~
# | 12: define <2 x i32> @vec(<2 x i1> %c, <2 x i32> %v1, <2 x i32> %v2) !prof !0 {
# | check:14'0 ~~~~~~~~~~~~~~~~~~~~~
# | 13: %r = select <2 x i1> %c, <2 x i32> %v1, <2 x i32> %v2
# | 14: ret <2 x i32> %r
# | 15: }
# | 16:
# | 17: !0 = !{!"function_entry_count", i64 1000}
# | check:18 X error: no match found
# | >>>>>>
# `-----------------------------
# 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/175096
More information about the llvm-branch-commits
mailing list