[llvm] [SCEV] Rework wrap-flag-inferrence in zext-addrec (PR #217405)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 11:40:45 PDT 2026


github-actions[bot] wrote:

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

* 140044 tests passed
* 3716 tests skipped
* 2 tests 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>
<details>
<summary>LLVM.Transforms/PhaseOrdering/scev-custom-dl.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe -passes='default<O3>,print<scalar-evolution>' -disable-output -S < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\PhaseOrdering\scev-custom-dl.ll 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\PhaseOrdering\scev-custom-dl.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' '-passes=default<O3>,print<scalar-evolution>' -disable-output -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\Transforms\PhaseOrdering\scev-custom-dl.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\PhaseOrdering\scev-custom-dl.ll:144:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: %i.0.reg2mem.0 = sub nuw nsw i32 255, %indvar
# |               ^
# | <stdin>:55:101: note: scanning from here
# |  --> {0,+,1}<nuw><nsw><%bb1> U: [0,256) S: [0,256) Exits: 255 LoopDispositions: { %bb1: Computable }
# |                                                                                                     ^
# | <stdin>:56:2: note: possible intended match here
# |  %i.0.reg2mem.0 = sub nsw i32 255, %indvar
# |  ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\PhaseOrdering\scev-custom-dl.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |            50: Loop %bb: symbolic max backedge-taken count is i32 100 
# |            51: Loop %bb: Trip multiple is 101 
# |            52: Printing analysis 'Scalar Evolution Analysis' for function 'test_loop_idiom_recogize': 
# |            53: Classifying expressions for: @test_loop_idiom_recogize 
# |            54:  %indvar = phi i32 [ 0, %bb1.thread ], [ %indvar.next, %bb1 ] 
# |            55:  --> {0,+,1}<nuw><nsw><%bb1> U: [0,256) S: [0,256) Exits: 255 LoopDispositions: { %bb1: Computable } 
# | next:144'0                                                                                                        {   search range start (exclusive)
# | next:144'1                                                                                                            error: no match found in search range
# |            56:  %i.0.reg2mem.0 = sub nsw i32 255, %indvar 
# | next:144'2      ?                                           possible intended match
# |            57:  --> {255,+,-1}<nsw><%bb1> U: [0,256) S: [0,256) Exits: 0 LoopDispositions: { %bb1: Computable } 
# |            58:  %0 = getelementptr [4 x i8], ptr %alp, i32 %i.0.reg2mem.0 
# |            59:  --> {(1020 + %alp),+,-4}<nw><%bb1> U: full-set S: full-set Exits: %alp LoopDispositions: { %bb1: Computable } 
# |            60:  %1 = load i32, ptr %0, align 4 
# |            61:  --> %1 U: full-set S: full-set Exits: <<Unknown>> LoopDispositions: { %bb1: Variant } 
# |             .
# |             .
# |             .
# |            72: Determining loop execution counts for: @test_loop_idiom_recogize 
# |            73: Loop %bb1: backedge-taken count is i32 255 
# |            74: Loop %bb1: constant max backedge-taken count is i32 255 
# |            75: Loop %bb1: symbolic max backedge-taken count is i32 255 
# |            76: Loop %bb1: Trip multiple is 256 
# |            77: Printing analysis 'Scalar Evolution Analysis' for function 'test_range_ref1': 
# | next:144'3                                                                                 }   search range end (exclusive)
# |            78: Classifying expressions for: @test_range_ref1 
# |            79:  %0 = zext i8 %t to i40 
# |            80:  --> (zext i8 %t to i40) U: [0,256) S: [0,256) 
# |            81:  %t.ptr = inttoptr i40 %0 to ptr 
# |            82:  --> %t.ptr U: [0,256) S: [0,256) 
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# 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/217405


More information about the llvm-commits mailing list