[llvm] [SCEV] Fix incorrect nw-inferrence in zext-addrec (PR #217785)

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 20 18:06:59 PDT 2026


github-actions[bot] wrote:

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

* 140134 tests passed
* 3723 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/PowerPC/hardware-loops-crash.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe < C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\PowerPC\hardware-loops-crash.ll -passes=hardware-loops -verify-loop-lcssa -S | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\PowerPC\hardware-loops-crash.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=hardware-loops -verify-loop-lcssa -S
# 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\CodeGen\PowerPC\hardware-loops-crash.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\PowerPC\hardware-loops-crash.ll:27:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[INDVAR:%.*]] = phi i64 [ 0, [[WHILE_COND25_PREHEADER]] ], [ [[INDVAR_NEXT:%.*]], [[LAND_RHS:%.*]] ]
# |               ^
# | <stdin>:28:14: note: scanning from here
# | while.cond25: ; preds = %while.cond25.preheader, %land.rhs
# |              ^
# | <stdin>:28:14: note: with "WHILE_COND25_PREHEADER" equal to "%while.cond25.preheader"
# | while.cond25: ; preds = %while.cond25.preheader, %land.rhs
# |              ^
# | <stdin>:28:14: note: pattern attempts to capture variables: "INDVAR", "INDVAR_NEXT", "LAND_RHS"
# | while.cond25: ; preds = %while.cond25.preheader, %land.rhs
# |              ^
# | <stdin>:29:11: note: possible intended match here
# |  %indvars.iv349 = phi i64 [ %indvars.iv.next350, %land.rhs ], [ %indvars.iv349.ph, %while.cond25.preheader ]
# |           ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\PowerPC\hardware-loops-crash.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |           23: while.cond25.preheader: ; preds = %for.inc 
# |           24:  %indvars.iv349.ph = phi i64 [ 50, %for.inc ] 
# |           25:  call void @llvm.set.loop.iterations.i64(i64 51) 
# |           26:  br label %while.cond25 
# |           27:  
# |           28: while.cond25: ; preds = %while.cond25.preheader, %land.rhs 
# | next:27'0                 {                                                search range start (exclusive)
# | next:27'1                                                                  error: no match found in search range
# | next:27'2                                                                  with "WHILE_COND25_PREHEADER" equal to "%while.cond25.preheader"
# | next:27'3                                                                  pattern attempts to capture variables: "INDVAR", "INDVAR_NEXT", "LAND_RHS"
# |           29:  %indvars.iv349 = phi i64 [ %indvars.iv.next350, %land.rhs ], [ %indvars.iv349.ph, %while.cond25.preheader ] 
# | next:27'4               ?                                                                                                    possible intended match
# |           30:  %0 = call i1 @llvm.loop.decrement.i64(i64 1) 
# |           31:  br i1 %0, label %land.rhs, label %while.end187 
# |           32:  
# |           33: land.rhs: ; preds = %while.cond25 
# |           34:  %indvars.iv.next350 = add nsw i64 %indvars.iv349, -1 
# |            .
# |            .
# |            .
# |           67:  
# |           68: ; Function Attrs: nocallback noduplicate nofree nosync nounwind willreturn 
# |           69: declare i1 @llvm.loop.decrement.i64(i64) #1 
# |           70:  
# |           71: attributes #0 = { memory(none) } 
# |           72: attributes #1 = { nocallback noduplicate nofree nosync nounwind willreturn } 
# | next:27'5                                                                                  } 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/217785


More information about the llvm-commits mailing list