[llvm] [IndVarSimplify] Keep additional nuw and nsw flags during LinearFunctionTestReplace (PR #177433)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 12:54:38 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 133327 tests passed
* 3081 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.Transforms/IndVarSimplify/X86/loop-invariant-conditions.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe -S -passes=indvars -indvars-predicate-loops=0 C:\_work\llvm-project\llvm-project\llvm\test\Transforms\IndVarSimplify\X86\loop-invariant-conditions.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\IndVarSimplify\X86\loop-invariant-conditions.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -S -passes=indvars -indvars-predicate-loops=0 'C:\_work\llvm-project\llvm-project\llvm\test\Transforms\IndVarSimplify\X86\loop-invariant-conditions.ll'
# note: command had no output on stdout or stderr
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe' 'C:\_work\llvm-project\llvm-project\llvm\test\Transforms\IndVarSimplify\X86\loop-invariant-conditions.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\IndVarSimplify\X86\loop-invariant-conditions.ll:529:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[INDVARS_IV_NEXT]] = add i64 [[INDVARS_IV]], 1
# |               ^
# | <stdin>:290:71: note: scanning from here
# |  %indvars.iv = phi i64 [ %start, %entry ], [ %indvars.iv.next, %loop ]
# |                                                                       ^
# | <stdin>:290:71: note: with "INDVARS_IV_NEXT" equal to "%indvars.iv.next"
# |  %indvars.iv = phi i64 [ %start, %entry ], [ %indvars.iv.next, %loop ]
# |                                                                       ^
# | <stdin>:290:71: note: with "INDVARS_IV" equal to "%indvars.iv"
# |  %indvars.iv = phi i64 [ %start, %entry ], [ %indvars.iv.next, %loop ]
# |                                                                       ^
# | <stdin>:291:17: note: possible intended match here
# |  %indvars.iv.next = add nsw i64 %indvars.iv, 1
# |                 ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\IndVarSimplify\X86\loop-invariant-conditions.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           285:  %smax = call i64 @llvm.smax.i64(i64 %start, i64 -1) 
# |           286:  %0 = add i64 %smax, 1 
# |           287:  br label %loop 
# |           288:  
# |           289: loop: ; preds = %loop, %entry 
# |           290:  %indvars.iv = phi i64 [ %start, %entry ], [ %indvars.iv.next, %loop ] 
# | next:529'0                                                                           X error: no match found
# | next:529'1                                                                             with "INDVARS_IV_NEXT" equal to "%indvars.iv.next"
# | next:529'2                                                                             with "INDVARS_IV" equal to "%indvars.iv"
# |           291:  %indvars.iv.next = add nsw i64 %indvars.iv, 1 
# | next:529'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:529'3                     ?                               possible intended match
# |           292:  %exitcond = icmp ne i64 %indvars.iv.next, %0 
# | next:529'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           293:  br i1 %exitcond, label %loop, label %for.end 
# | next:529'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           294:  
# | next:529'0     ~
# |           295: for.end: ; preds = %loop 
# | next:529'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |           296:  ret void 
# | next:529'0     ~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# 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/177433


More information about the llvm-commits mailing list