[llvm] [LoopFusion] Add a testcase that exposes a bug (PR #217379)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 10:46:16 PDT 2026


github-actions[bot] wrote:

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

* 140042 tests passed
* 3716 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.Transforms/LoopFusion/different_guards.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe -passes=loop-fusion -loop-fusion-peel-max-count=2 -S < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoopFusion\different_guards.ll 2>&1 | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoopFusion\different_guards.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -passes=loop-fusion -loop-fusion-peel-max-count=2 -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\LoopFusion\different_guards.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoopFusion\different_guards.ll:94:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[INDVARS_IV1386:%.*]] = phi i64 [ [[INDVARS_IV_NEXT1387:%.*]], %[[DOTLR_PH1333_PEEL]] ], [ 0, %[[DOTLR_PH1333_PREHEADER]] ]
# |               ^
# | <stdin>:59:23: note: scanning from here
# | .lr.ph1333.peel.begin: ; preds = %.lr.ph1333.preheader
# |                       ^
# | <stdin>:59:23: note: with "DOTLR_PH1333_PEEL" equal to ".lr.ph1333.peel.begin"
# | .lr.ph1333.peel.begin: ; preds = %.lr.ph1333.preheader
# |                       ^
# | <stdin>:59:23: note: with "DOTLR_PH1333_PREHEADER" equal to ".lr.ph1333.preheader"
# | .lr.ph1333.peel.begin: ; preds = %.lr.ph1333.preheader
# |                       ^
# | <stdin>:59:23: note: pattern attempts to capture variables: "INDVARS_IV1386", "INDVARS_IV_NEXT1387"
# | .lr.ph1333.peel.begin: ; preds = %.lr.ph1333.preheader
# |                       ^
# | <stdin>:79:12: note: possible intended match here
# |  %indvars.iv1386 = phi i64 [ %indvars.iv.next1387, %.lr.ph1333 ], [ %indvars.iv.next1387.peel, %.lr.ph1333.preheader.peel.newph ]
# |            ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\LoopFusion\different_guards.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |           54:  br i1 %0, label %.lr.ph1333.preheader, label %.loopexit 
# |           55:  
# |           56: .lr.ph1333.preheader: ; preds = %2 
# |           57:  br label %.lr.ph1333.peel.begin 
# |           58:  
# |           59: .lr.ph1333.peel.begin: ; preds = %.lr.ph1333.preheader 
# | next:94'0                          {                                   search range start (exclusive)
# | next:94'1                                                              error: no match found in search range
# | next:94'2                                                              with "DOTLR_PH1333_PEEL" equal to ".lr.ph1333.peel.begin"
# | next:94'3                                                              with "DOTLR_PH1333_PREHEADER" equal to ".lr.ph1333.preheader"
# | next:94'4                                                              pattern attempts to capture variables: "INDVARS_IV1386", "INDVARS_IV_NEXT1387"
# |           60:  br label %.lr.ph1333.peel 
# |           61:  
# |           62: .lr.ph1333.peel: ; preds = %.lr.ph1333.peel.begin 
# |           63:  %3 = getelementptr [8 x i8], ptr %b1, i64 0 
# |           64:  store double 0.000000e+00, ptr %3, align 8 
# |            .
# |            .
# |            .
# |           74:  
# |           75: .lr.ph1333.preheader.peel.newph: ; preds = %.lr.ph1333.peel.next1 
# |           76:  br label %.lr.ph1333 
# |           77:  
# |           78: .lr.ph1333: ; preds = %.lr.ph1333, %.lr.ph1333.preheader.peel.newph 
# |           79:  %indvars.iv1386 = phi i64 [ %indvars.iv.next1387, %.lr.ph1333 ], [ %indvars.iv.next1387.peel, %.lr.ph1333.preheader.peel.newph ] 
# | next:94'5                ?                                                                                                                        possible intended match
# |           80:  %indvars.iv1390 = phi i64 [ %indvars.iv.next1391, %.lr.ph1333 ], [ 1, %.lr.ph1333.preheader.peel.newph ] 
# |           81:  %4 = getelementptr [8 x i8], ptr %b1, i64 %indvars.iv1386 
# |           82:  store double 0.000000e+00, ptr %4, align 8 
# |           83:  %indvars.iv.next1387 = add i64 %indvars.iv1386, 1 
# |           84:  %exitcond1389.not = icmp eq i64 %indvars.iv1386, 40 
# |            .
# |            .
# |            .
# |           92:  br label %.loopexit 
# |           93:  
# |           94: .loopexit: ; preds = %2, %.loopexit.loopexit 
# |           95:  store volatile i32 0, ptr %b1, align 4 
# |           96:  ret void 
# |           97: } 
# | next:94'6       } 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/217379


More information about the llvm-commits mailing list