[llvm] [SLP] Vectorize zero-tested OR/UMax reductions (PR #205473)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 27 00:43:53 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 136262 tests passed
* 3493 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### LLVM
<details>
<summary>LLVM.Transforms/SLPVectorizer/X86/reduction-zero-test-ctpop.ll</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux -mcpu=skylake-avx512 < C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SLPVectorizer\X86\reduction-zero-test-ctpop.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SLPVectorizer\X86\reduction-zero-test-ctpop.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -S --passes=slp-vectorizer -mtriple=x86_64-unknown-linux -mcpu=skylake-avx512
# 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\SLPVectorizer\X86\reduction-zero-test-ctpop.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SLPVectorizer\X86\reduction-zero-test-ctpop.ll:9:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[CMP:%.*]] = call i1 @llvm.vector.reduce.or.v8i1(<8 x i1> [[TMP1]])
# | ^
# | <stdin>:8:47: note: scanning from here
# | %1 = icmp ne <8 x i8> %input, zeroinitializer
# | ^
# | <stdin>:8:47: note: with "TMP1" equal to "%1"
# | %1 = icmp ne <8 x i8> %input, zeroinitializer
# | ^
# | <stdin>:10:2: note: possible intended match here
# | %3 = call i8 @llvm.ctpop.i8(i8 %2)
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SLPVectorizer\X86\reduction-zero-test-ctpop.ll:39:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[CMP:%.*]] = call i1 @llvm.vector.reduce.or.v8i1(<8 x i1> [[TMP1]])
# | ^
# | <stdin>:18:47: note: scanning from here
# | %1 = icmp ne <8 x i8> %input, zeroinitializer
# | ^
# | <stdin>:18:47: note: with "TMP1" equal to "%1"
# | %1 = icmp ne <8 x i8> %input, zeroinitializer
# | ^
# | <stdin>:20:2: note: possible intended match here
# | %3 = call i8 @llvm.ctpop.i8(i8 %2)
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SLPVectorizer\X86\reduction-zero-test-ctpop.ll:68:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP1:%.*]] = icmp eq <8 x i8> [[INPUT]], zeroinitializer
# | ^
# | <stdin>:27:41: note: scanning from here
# | %input = load <8 x i8>, ptr %p, align 1
# | ^
# | <stdin>:27:41: note: with "INPUT" equal to "%input"
# | %input = load <8 x i8>, ptr %p, align 1
# | ^
# | <stdin>:28:5: note: possible intended match here
# | %1 = icmp ne <8 x i8> %input, zeroinitializer
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SLPVectorizer\X86\reduction-zero-test-ctpop.ll:99:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[CMP:%.*]] = call i1 @llvm.vector.reduce.or.v8i1(<8 x i1> [[TMP1]])
# | ^
# | <stdin>:38:47: note: scanning from here
# | %1 = icmp ne <8 x i8> %input, zeroinitializer
# | ^
# | <stdin>:38:47: note: with "TMP1" equal to "%1"
# | %1 = icmp ne <8 x i8> %input, zeroinitializer
# | ^
# | <stdin>:40:2: note: possible intended match here
# | %3 = call i8 @llvm.ctpop.i8(i8 %2)
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SLPVectorizer\X86\reduction-zero-test-ctpop.ll:135:15: error: CHECK-NEXT: expected string not found in input
# | ; CHECK-NEXT: [[TMP1:%.*]] = icmp eq <8 x i8> [[INPUT]], zeroinitializer
# | ^
# | <stdin>:47:41: note: scanning from here
# | %input = load <8 x i8>, ptr %p, align 1
# | ^
# | <stdin>:47:41: note: with "INPUT" equal to "%input"
# | %input = load <8 x i8>, ptr %p, align 1
# | ^
# | <stdin>:48:5: note: possible intended match here
# | %1 = icmp ne <8 x i8> %input, zeroinitializer
# | ^
# |
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\SLPVectorizer\X86\reduction-zero-test-ctpop.ll
# |
# | -dump-input=help explains the following input dump.
# |
# | Input was:
# | <<<<<<
# | 1: ; ModuleID = '<stdin>'
# | 2: source_filename = "<stdin>"
# | 3: target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
# | 4: target triple = "x86_64-unknown-linux"
# | 5:
# | 6: define i32 @or_nonzero(ptr %p) #0 {
# | 7: %input = load <8 x i8>, ptr %p, align 1
# | 8: %1 = icmp ne <8 x i8> %input, zeroinitializer
# | next:9'0 { search range start (exclusive)
# | next:9'1 error: no match found in search range
# | next:9'2 with "TMP1" equal to "%1"
# | 9: %2 = bitcast <8 x i1> %1 to i8
# | 10: %3 = call i8 @llvm.ctpop.i8(i8 %2)
# | next:9'3 ? possible intended match
# | 11: %cmp = icmp ne i8 %3, 0
# | 12: %result = zext i1 %cmp to i32
# | 13: ret i32 %result
# | 14: }
# | 15:
# | 16: define i32 @or_nonzero_commuted(ptr %p) #0 {
# | next:9'4 } search range end (exclusive)
# | 17: %input = load <8 x i8>, ptr %p, align 1
# | 18: %1 = icmp ne <8 x i8> %input, zeroinitializer
# | next:39'0 { search range start (exclusive)
# | next:39'1 error: no match found in search range
# | next:39'2 with "TMP1" equal to "%1"
# | 19: %2 = bitcast <8 x i1> %1 to i8
# | 20: %3 = call i8 @llvm.ctpop.i8(i8 %2)
# | next:39'3 ? possible intended match
# | 21: %cmp = icmp ne i8 %3, 0
# | 22: %result = zext i1 %cmp to i32
# | 23: ret i32 %result
# | 24: }
# | 25:
# | 26: define i32 @or_zero(ptr %p) #0 {
# | next:39'4 } search range end (exclusive)
# | 27: %input = load <8 x i8>, ptr %p, align 1
# | next:68'0 { search range start (exclusive)
# | next:68'1 error: no match found in search range
# | next:68'2 with "INPUT" equal to "%input"
# | 28: %1 = icmp ne <8 x i8> %input, zeroinitializer
# | next:68'3 ? possible intended match
# | 29: %2 = bitcast <8 x i1> %1 to i8
# | 30: %3 = call i8 @llvm.ctpop.i8(i8 %2)
# | 31: %cmp = icmp eq i8 %3, 0
# | 32: %result = zext i1 %cmp to i32
# | 33: ret i32 %result
# | 34: }
# | 35:
# | 36: define i32 @umax_nonzero(ptr %p) #0 {
# | next:68'4 } search range end (exclusive)
# | 37: %input = load <8 x i8>, ptr %p, align 1
# | 38: %1 = icmp ne <8 x i8> %input, zeroinitializer
# | next:99'0 { search range start (exclusive)
# | next:99'1 error: no match found in search range
# | next:99'2 with "TMP1" equal to "%1"
# | 39: %2 = bitcast <8 x i1> %1 to i8
# | 40: %3 = call i8 @llvm.ctpop.i8(i8 %2)
# | next:99'3 ? possible intended match
# | 41: %cmp = icmp ne i8 %3, 0
# | 42: %result = zext i1 %cmp to i32
# | 43: ret i32 %result
# | 44: }
# | 45:
# | 46: define i32 @umax_zero_commuted(ptr %p) #0 {
# | next:99'4 } search range end (exclusive)
# | 47: %input = load <8 x i8>, ptr %p, align 1
# | next:135'0 { search range start (exclusive)
# | next:135'1 error: no match found in search range
# | next:135'2 with "INPUT" equal to "%input"
# | 48: %1 = icmp ne <8 x i8> %input, zeroinitializer
# | next:135'3 ? possible intended match
# | 49: %2 = bitcast <8 x i1> %1 to i8
# | 50: %3 = call i8 @llvm.ctpop.i8(i8 %2)
# | 51: %cmp = icmp eq i8 %3, 0
# | 52: %result = zext i1 %cmp to i32
# | 53: ret i32 %result
# | .
# | .
# | .
# | 61:
# | 62: ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
# | 63: declare i8 @llvm.vector.reduce.umax.v8i8(<8 x i8>) #1
# | 64:
# | 65: attributes #0 = { "target-cpu"="skylake-avx512" }
# | 66: attributes #1 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
# | next:135'4 } 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/205473
More information about the llvm-commits
mailing list