[llvm-branch-commits] [llvm] [IndVarSimplify] Use context to prove a narrow IV def non-negative (PR #236461)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Oct 30 06:34:35 PDT 2026


github-actions[bot] wrote:

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

* 159591 tests passed
* 2321 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.Transforms/LoopFlatten/invalidate-scev-pr203176.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopFlatten/invalidate-scev-pr203176.ll -passes='loop(loop-flatten),print<scalar-evolution>' -disable-output 2>&1 | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopFlatten/invalidate-scev-pr203176.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt '-passes=loop(loop-flatten),print<scalar-evolution>' -disable-output
# 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/llvm/test/Transforms/LoopFlatten/invalidate-scev-pr203176.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopFlatten/invalidate-scev-pr203176.ll:33:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: %4 = trunc nuw i64 %indvar to i32
# |               ^
# | <stdin>:24:308: note: scanning from here
# |  --> {@g,+,(4 * (sext i32 {0,+,1}<%outer.loop> to i64))<nsw>}<nw><%mid.loop> U: [4,-7) S: [-9223372036854775808,9223372036854775805) Exits: {@g,+,(4 * (sext i32 {0,+,1}<%outer.loop> to i64))<nsw>}<nuw><nsw><%mid.loop> LoopDispositions: { %inner.loop: Invariant, %mid.loop: Computable, %outer.loop: Variant }
# |                                                                                                                                                                                                                                                                                                                    ^
# | <stdin>:25:2: note: possible intended match here
# |  %4 = trunc nuw nsw i64 %indvar to i32
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopFlatten/invalidate-scev-pr203176.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |           19:  %mul = mul i32 %k, %tc 
# |           20:  --> {0,+,{0,+,1}<%outer.loop>}<nsw><%mid.loop> U: [0,1) S: [0,1) Exits: {0,+,{0,+,1}<%outer.loop>}<nuw><nsw><%mid.loop> LoopDispositions: { %inner.loop: Invariant, %mid.loop: Computable, %outer.loop: Variant } 
# |           21:  %3 = trunc nuw nsw i64 %2 to i32 
# |           22:  --> {0,+,{0,+,1}<%outer.loop>}<nuw><nsw><%mid.loop> U: [0,1) S: [0,1) Exits: {0,+,{0,+,1}<%outer.loop>}<nuw><nsw><%mid.loop> LoopDispositions: { %inner.loop: Invariant, %mid.loop: Computable, %outer.loop: Variant } 
# |           23:  %gep = getelementptr i32, ptr @g, i32 %3 
# |           24:  --> {@g,+,(4 * (sext i32 {0,+,1}<%outer.loop> to i64))<nsw>}<nw><%mid.loop> U: [4,-7) S: [-9223372036854775808,9223372036854775805) Exits: {@g,+,(4 * (sext i32 {0,+,1}<%outer.loop> to i64))<nsw>}<nuw><nsw><%mid.loop> LoopDispositions: { %inner.loop: Invariant, %mid.loop: Computable, %outer.loop: Variant } 
# | next:33'0                                                                                                                                                                                                                                                                                                                       {   search range start (exclusive)
# | next:33'1                                                                                                                                                                                                                                                                                                                           error: no match found in search range
# |           25:  %4 = trunc nuw nsw i64 %indvar to i32 
# | next:33'2      ?                                       possible intended match
# |           26:  --> {0,+,1}<nuw><%inner.loop> U: [0,-1) S: [0,-1) Exits: {-1,+,1}<%outer.loop> LoopDispositions: { %inner.loop: Computable, %mid.loop: Uniform, %outer.loop: Uniform } 
# |           27:  %arrayidx = getelementptr i32, ptr %gep, i32 %4 
# |           28:  --> ((4 * (sext i32 {0,+,1}<nuw><%inner.loop> to i64))<nsw> + {@g,+,(4 * (sext i32 {0,+,1}<%outer.loop> to i64))<nsw>}<nuw><nsw><%mid.loop>) U: [0,-3) S: [-9223372036854775808,9223372036854775805) Exits: {((4 * (sext i32 {-1,+,1}<%outer.loop> to i64))<nsw> + @g),+,(4 * (sext i32 {0,+,1}<%outer.loop> to i64))<nsw>}<nw><%mid.loop> LoopDispositions: { %inner.loop: Computable, %mid.loop: Variant, %outer.loop: Variant } 
# |           29:  %indvar.next = add i64 %indvar, 1 
# |           30:  --> {1,+,1}<nuw><nsw><%inner.loop> U: [1,4294967296) S: [1,4294967296) Exits: (zext i32 {0,+,1}<%outer.loop> to i64) LoopDispositions: { %inner.loop: Computable, %mid.loop: Uniform, %outer.loop: Uniform } 
# |            .
# |            .
# |            .
# |           44: Loop %mid.loop: symbolic max backedge-taken count is i1 false 
# |           45: Loop %mid.loop: Trip multiple is 1 
# |           46: Loop %outer.loop: backedge-taken count is %n 
# |           47: Loop %outer.loop: constant max backedge-taken count is i64 -1 
# |           48: Loop %outer.loop: symbolic max backedge-taken count is %n 
# |           49: Loop %outer.loop: Trip multiple is 1 
# | next:33'3                                          } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# 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/236461


More information about the llvm-branch-commits mailing list