[llvm] [DA] Rewrite BanerjeeMIV test with safe APInt interval arithmetic (PR #207662)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 17 00:51:59 PDT 2026


github-actions[bot] wrote:

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

* 179106 tests passed
* 3551 tests skipped
* 2 tests failed

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

### LLVM
<details>
<summary>LLVM.Transforms/LoopInterchange/inner-indvar-depend-on-outer-indvar.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/LoopInterchange/inner-indvar-depend-on-outer-indvar.ll -passes=loop-interchange -verify-dom-info -verify-loop-info -S -da-enable-dependence-test=all 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/LoopInterchange/inner-indvar-depend-on-outer-indvar.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=loop-interchange -verify-dom-info -verify-loop-info -S -da-enable-dependence-test=all
# 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/LoopInterchange/inner-indvar-depend-on-outer-indvar.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopInterchange/inner-indvar-depend-on-outer-indvar.ll:17:15: error: CHECK-NEXT: is not on the line after the previous match
# | ; CHECK-NEXT: br label %[[FOR1_HEADER:.*]]
# |               ^
# | <stdin>:14:2: note: 'next' match was here
# |  br label %for2
# |  ^
# | <stdin>:12:13: note: previous match ended here
# | for1.header: ; preds = %for1.inc10, %entry
# |             ^
# | <stdin>:13:1: note: non-matching line after previous match is here
# |  %i = phi i64 [ 0, %entry ], [ %i.next, %for1.inc10 ]
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopInterchange/inner-indvar-depend-on-outer-indvar.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |            7: define void @interchange_04(i64 %k) { 
# |            8: entry: 
# |            9:  %0 = load i64, ptr @N, align 4 
# |           10:  br label %for1.header 
# |           11:  
# |           12: for1.header: ; preds = %for1.inc10, %entry 
# | next:17'0                {                                 search range start (exclusive)
# |           13:  %i = phi i64 [ 0, %entry ], [ %i.next, %for1.inc10 ] 
# |           14:  br label %for2 
# | next:17'1      !~~~~~~~~~~~~~   error: match on wrong line
# |           15:  
# |           16: for2: ; preds = %for2, %for1.header 
# |           17:  %j = phi i64 [ %j.next, %for2 ], [ 0, %for1.header ] 
# |           18:  %arrayidx5 = getelementptr inbounds [100 x [100 x i64]], ptr @A, i64 0, i64 %j, i64 %i 
# |           19:  %lv = load i64, ptr %arrayidx5, align 4 
# |            .
# |            .
# |            .
# |           28:  %exitcond26 = icmp eq i64 %i, 99 
# |           29:  br i1 %exitcond26, label %for.end12, label %for1.header 
# |           30:  
# |           31: for.end12: ; preds = %for1.inc10 
# |           32:  ret void 
# |           33: } 
# | next:17'2       } search range end (exclusive)
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.Transforms/LoopInterchange/interchange-insts-between-indvar.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/LoopInterchange/interchange-insts-between-indvar.ll -passes=loop-interchange -cache-line-size=64 -da-enable-dependence-test=all -S | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopInterchange/interchange-insts-between-indvar.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=loop-interchange -cache-line-size=64 -da-enable-dependence-test=all -S
# 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/LoopInterchange/interchange-insts-between-indvar.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopInterchange/interchange-insts-between-indvar.ll:22:15: error: CHECK-NEXT: is not on the line after the previous match
# | ; CHECK-NEXT: br label %[[FOR_COND1_PREHEADER:.*]]
# |               ^
# | <stdin>:18:2: note: 'next' match was here
# |  br label %for.body4
# |  ^
# | <stdin>:11:19: note: previous match ended here
# | for.cond.loopexit: ; preds = %for.body4
# |                   ^
# | <stdin>:12:1: note: non-matching line after previous match is here
# |  %exitcond28 = icmp ne i64 %indvars.iv.next27, 2
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopInterchange/interchange-insts-between-indvar.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |            6:  
# |            7: define void @interchange_11(i32 %n) { 
# |            8: entry: 
# |            9:  br label %for.cond1.preheader 
# |           10:  
# |           11: for.cond.loopexit: ; preds = %for.body4 
# | next:22'0                      {                        search range start (exclusive)
# |           12:  %exitcond28 = icmp ne i64 %indvars.iv.next27, 2 
# |           13:  br i1 %exitcond28, label %for.cond1.preheader, label %for.cond.cleanup 
# |           14:  
# |           15: for.cond1.preheader: ; preds = %for.cond.loopexit, %entry 
# |           16:  %indvars.iv26 = phi i64 [ 0, %entry ], [ %indvars.iv.next27, %for.cond.loopexit ] 
# |           17:  %indvars.iv.next27 = add nuw nsw i64 %indvars.iv26, 1 
# |           18:  br label %for.body4 
# | next:22'1      !~~~~~~~~~~~~~~~~~~   error: match on wrong line
# |           19:  
# |           20: for.cond.cleanup: ; preds = %for.cond.loopexit 
# |           21:  ret void 
# |           22:  
# |           23: for.body4: ; preds = %for.body4, %for.cond1.preheader 
# |           24:  %indvars.iv = phi i64 [ 0, %for.cond1.preheader ], [ %indvars.iv.next, %for.body4 ] 
# |           25:  %arrayidx10 = getelementptr inbounds [3 x [3 x i32]], ptr @A10, i64 0, i64 %indvars.iv, i64 %indvars.iv.next27 
# |           26:  %tmp1 = trunc i64 %indvars.iv to i32 
# |           27:  store i32 %tmp1, ptr %arrayidx10, align 4 
# |           28:  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1 
# |           29:  %n.wide = zext i32 %n to i64 
# |           30:  %exitcond = icmp ne i64 %indvars.iv.next, %n.wide 
# |           31:  br i1 %exitcond, label %for.body4, label %for.cond.loopexit 
# |           32: } 
# | next:22'2       } 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/207662


More information about the llvm-commits mailing list