[llvm] [VPlan] Move IV predicate handling to VPlan. (PR #192876)

via llvm-commits llvm-commits at lists.llvm.org
Thu May 7 14:02:08 PDT 2026


github-actions[bot] wrote:

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

* 173978 tests passed
* 3308 tests skipped
* 2 tests failed

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

### LLVM
<details>
<summary>LLVM.Transforms/LoopVectorize/predicated-inductions-vs-first-order-recurrences.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 -force-vector-width=4 -S /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/predicated-inductions-vs-first-order-recurrences.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/predicated-inductions-vs-first-order-recurrences.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=loop-vectorize -force-vector-width=4 -S /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/predicated-inductions-vs-first-order-recurrences.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/predicated-inductions-vs-first-order-recurrences.ll
# note: command had no output on stdout or stderr
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=loop-vectorize -force-vector-width=4 -vectorize-scev-check-threshold=0 -S /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/predicated-inductions-vs-first-order-recurrences.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=THRESHOLD /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/predicated-inductions-vs-first-order-recurrences.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -passes=loop-vectorize -force-vector-width=4 -vectorize-scev-check-threshold=0 -S /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/predicated-inductions-vs-first-order-recurrences.ll
# .---command stderr------------
# | remark: <unknown>:0:0: loop not vectorized: Too many SCEV assumptions need to be made and checked at runtime
# | remark: <unknown>:0:0: UserVF ignored because of invalid costs.
# | remark: <unknown>:0:0: loop not vectorized: Too many SCEV assumptions need to be made and checked at runtime
# `-----------------------------
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefix=THRESHOLD /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/predicated-inductions-vs-first-order-recurrences.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/predicated-inductions-vs-first-order-recurrences.ll:462:19: error: THRESHOLD-NEXT: expected string not found in input
# | ; THRESHOLD-NEXT: [[SMAX1:%.*]] = call i64 @llvm.smax.i64(i64 [[N]], i64 1)
# |                   ^
# | <stdin>:197:7: note: scanning from here
# | entry:
# |       ^
# | <stdin>:197:7: note: with "N" equal to "%n"
# | entry:
# |       ^
# | <stdin>:218:1: note: possible intended match here
# | declare i64 @llvm.smax.i64(i64, i64) #1
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/predicated-inductions-vs-first-order-recurrences.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           192: exit: ; preds = %middle.block 
# |           193:  ret void 
# |           194: } 
# |           195:  
# |           196: define i64 @for_and_ind_liveout_gep(ptr %dst, i64 %n) { 
# |           197: entry: 
# | next:462'0           X error: no match found
# | next:462'1             with "N" equal to "%n"
# |           198:  br label %loop 
# | next:462'0     ~~~~~~~~~~~~~~~~
# |           199:  
# | next:462'0     ~
# |           200: loop: ; preds = %loop, %entry 
# | next:462'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           201:  %iv = phi i64 [ 0, %entry ], [ %iv.next, %loop ] 
# | next:462'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           202:  %narrow = phi i16 [ 0, %entry ], [ %inc, %loop ] 
# | next:462'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# |           213:  %result = phi i64 [ %ext, %loop ] 
# | next:462'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           214:  ret i64 %result 
# | next:462'0     ~~~~~~~~~~~~~~~~~
# |           215: } 
# | next:462'0     ~~
# |           216:  
# | next:462'0     ~
# |           217: ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) 
# | next:462'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           218: declare i64 @llvm.smax.i64(i64, i64) #1 
# | next:462'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:462'2     ?                                        possible intended match
# |           219:  
# | next:462'0     ~
# |           220: attributes #0 = { optsize } 
# | next:462'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           221: attributes #1 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) } 
# | next:462'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           222:  
# | next:462'0     ~
# |           223: !0 = distinct !{!0, !1, !2} 
# | next:462'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>
<details>
<summary>LLVM.Transforms/LoopVectorize/predicated-inductions.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -passes=loop-vectorize -force-vector-interleave=1 -force-vector-width=4 < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/predicated-inductions.ll | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=COMMON,CHECK /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/predicated-inductions.ll
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -passes=loop-vectorize -force-vector-interleave=1 -force-vector-width=4
# .---command stderr------------
# | remark: <unknown>:0:0: UserVF ignored because of invalid costs.
# `-----------------------------
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck --check-prefixes=COMMON,CHECK /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/predicated-inductions.ll
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/predicated-inductions.ll:370:15: error: CHECK-NEXT: is not on the line after the previous match
# | ; CHECK-NEXT: [[SMAX:%.*]] = call i64 @llvm.smax.i64(i64 [[N]], i64 1)
# |               ^
# | <stdin>:182:2: note: 'next' match was here
# |  %smax = call i64 @llvm.smax.i64(i64 %n, i64 1)
# |  ^
# | <stdin>:180:18: note: previous match ended here
# | vector.scevcheck: ; preds = %entry
# |                  ^
# | <stdin>:181:1: note: non-matching line after previous match is here
# |  %ident.check = icmp ne i64 %stride, 1
# | ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/Transforms/LoopVectorize/predicated-inductions.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |           .
# |           .
# |           .
# |         177:  %min.iters.check = icmp ult i64 %smax3, 4 
# |         178:  br i1 %min.iters.check, label %scalar.ph, label %vector.scevcheck 
# |         179:  
# |         180: vector.scevcheck: ; preds = %entry 
# |         181:  %ident.check = icmp ne i64 %stride, 1 
# |         182:  %smax = call i64 @llvm.smax.i64(i64 %n, i64 1) 
# | next:370      !~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  error: match on wrong line
# |         183:  %0 = add nsw i64 %smax, -1 
# |         184:  %1 = trunc i64 %0 to i8 
# |         185:  %mul = call { i8, i1 } @llvm.umul.with.overflow.i8(i8 9, i8 %1) 
# |         186:  %mul.overflow = extractvalue { i8, i1 } %mul, 1 
# |         187:  %2 = icmp ugt i64 %0, 255 
# |           .
# |           .
# |           .
# | >>>>>>
# `-----------------------------
# 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/192876


More information about the llvm-commits mailing list