[llvm] [LV] Derive max trip count for remainder loops through LCSSA phis (PR #206887)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 24 06:32:37 PDT 2026


github-actions[bot] wrote:

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

* 181171 tests passed
* 3715 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.Transforms/LoopVectorize/X86/remainder-max-trip-count.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=loop-vectorize -mtriple=x86_64-unknown-linux-gnu -mcpu=skylake-avx512 -S /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/X86/remainder-max-trip-count.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/X86/remainder-max-trip-count.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=loop-vectorize -mtriple=x86_64-unknown-linux-gnu -mcpu=skylake-avx512 -S /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/X86/remainder-max-trip-count.ll
# 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/LoopVectorize/X86/remainder-max-trip-count.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/X86/remainder-max-trip-count.ll:45:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[N_MOD_VF:%.*]] = urem i64 [[TMP4]], 4
# |               ^
# | <stdin>:52:12: note: scanning from here
# | vector.ph2: ; preds = %loop.remainder.preheader1
# |            ^
# | <stdin>:52:12: note: with "TMP4" equal to "%4"
# | vector.ph2: ; preds = %loop.remainder.preheader1
# |            ^
# | <stdin>:52:12: note: pattern attempts to capture variables: "N_MOD_VF"
# | vector.ph2: ; preds = %loop.remainder.preheader1
# |            ^
# | <stdin>:53:2: note: possible intended match here
# |  %5 = and i64 %4, 3
# |  ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/X86/remainder-max-trip-count.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |            .
# |            .
# |            .
# |           47: loop.remainder.preheader1: ; preds = %loop.remainder.preheader 
# |           48:  %4 = sub i64 %n, %start.rem 
# |           49:  %min.iters.check = icmp ult i64 %4, 4 
# |           50:  br i1 %min.iters.check, label %scalar.ph, label %vector.ph2 
# |           51:  
# |           52: vector.ph2: ; preds = %loop.remainder.preheader1 
# | next:45'0               {                                        search range start (exclusive)
# | next:45'1                                                        error: no match found in search range
# | next:45'2                                                        with "TMP4" equal to "%4"
# | next:45'3                                                        pattern attempts to capture variables: "N_MOD_VF"
# |           53:  %5 = and i64 %4, 3 
# | next:45'4      ?                    possible intended match
# |           54:  %n.vec = sub i64 %4, %5 
# |           55:  %6 = add i64 %start.rem, %n.vec 
# |           56:  br label %vector.body3 
# |           57:  
# |           58: vector.body3: ; preds = %vector.body3, %vector.ph2 
# |            .
# |            .
# |            .
# |           98: attributes #0 = { "target-cpu"="skylake-avx512" } 
# |           99:  
# |          100: !0 = distinct !{!0, !1, !2} 
# |          101: !1 = !{!"llvm.loop.isvectorized", i32 1} 
# |          102: !2 = !{!"llvm.loop.unroll.runtime.disable"} 
# |          103: !3 = distinct !{!3, !2, !1} 
# | next:45'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/206887


More information about the llvm-commits mailing list