[llvm] [VectorCombine] Fold zero tests of or/umax reductions (PR #205622)

via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 24 22:55:58 PDT 2026


github-actions[bot] wrote:

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

* 136114 tests passed
* 3479 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.Transforms/VectorCombine/X86/fold-reduction-zero-test.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\opt.exe -mtriple=x86_64-- -mcpu=x86-64 -passes=vector-combine -S C:\_work\llvm-project\llvm-project\llvm\test\Transforms\VectorCombine\X86\fold-reduction-zero-test.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\Transforms\VectorCombine\X86\fold-reduction-zero-test.ll
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\opt.exe' -mtriple=x86_64-- -mcpu=x86-64 -passes=vector-combine -S 'C:\_work\llvm-project\llvm-project\llvm\test\Transforms\VectorCombine\X86\fold-reduction-zero-test.ll'
# 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\VectorCombine\X86\fold-reduction-zero-test.ll'
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\VectorCombine\X86\fold-reduction-zero-test.ll:9:15: error: CHECK-SAME: expected string not found in input
# | ; CHECK-SAME: <16 x i8> [[X:%.*]]) {
# |               ^
# | <stdin>:12:23: note: scanning from here
# | define i1 @or_nonzero(<16 x i8> %x) #1 {
# |                       ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\VectorCombine\X86\fold-reduction-zero-test.ll:21:15: error: CHECK-SAME: expected string not found in input
# | ; CHECK-SAME: <16 x i8> [[X:%.*]]) {
# |               ^
# | <stdin>:18:20: note: scanning from here
# | define i1 @or_zero(<16 x i8> %x) #1 {
# |                    ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\VectorCombine\X86\fold-reduction-zero-test.ll:33:15: error: CHECK-SAME: expected string not found in input
# | ; CHECK-SAME: <16 x i8> [[X:%.*]]) {
# |               ^
# | <stdin>:24:25: note: scanning from here
# | define i1 @umax_nonzero(<16 x i8> %x) #1 {
# |                         ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\VectorCombine\X86\fold-reduction-zero-test.ll:45:15: error: CHECK-SAME: expected string not found in input
# | ; CHECK-SAME: <16 x i8> [[X:%.*]]) {
# |               ^
# | <stdin>:30:31: note: scanning from here
# | define i1 @umax_zero_commuted(<16 x i8> %x) #1 {
# |                               ^
# | C:\_work\llvm-project\llvm-project\llvm\test\Transforms\VectorCombine\X86\fold-reduction-zero-test.ll:57:15: error: CHECK-SAME: expected string not found in input
# | ; CHECK-SAME: <16 x i8> [[X:%.*]], ptr [[OUT:%.*]]) {
# |               ^
# | <stdin>:36:32: note: scanning from here
# | define i1 @or_nonzero_multiuse(<16 x i8> %x, ptr %out) #1 {
# |                                ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\Transforms\VectorCombine\X86\fold-reduction-zero-test.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |          .
# |          .
# |          .
# |          7: declare i8 @llvm.vector.reduce.or.v16i8(<16 x i8>) #0 
# |          8:  
# |          9: ; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) 
# |         10: declare i8 @llvm.vector.reduce.umax.v16i8(<16 x i8>) #0 
# |         11:  
# |         12: define i1 @or_nonzero(<16 x i8> %x) #1 { 
# | same:9                            X~~~~~~~~~~~~~~~~~~ error: no match found
# |         13:  %1 = icmp ne <16 x i8> %x, zeroinitializer 
# | same:9      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |         14:  %cmp = call i1 @llvm.vector.reduce.or.v16i1(<16 x i1> %1) 
# | same:9      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |         15:  ret i1 %cmp 
# | same:9      ~~~~~~~~~~~~~
# |         16: } 
# | same:9      ~~
# |         17:  
# | same:9      ~
# |         18: define i1 @or_zero(<16 x i8> %x) #1 { 
# | same:9      ~~~~~~~~~~~~~~~~~~~
# | same:21                        X~~~~~~~~~~~~~~~~~~ error: no match found
# |         19:  %1 = icmp eq <16 x i8> %x, zeroinitializer 
# | same:21     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |         20:  %cmp = call i1 @llvm.vector.reduce.and.v16i1(<16 x i1> %1) 
# | same:21     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |         21:  ret i1 %cmp 
# | same:21     ~~~~~~~~~~~~~
# |         22: } 
# | same:21     ~~
# |         23:  
# | same:21     ~
# |         24: define i1 @umax_nonzero(<16 x i8> %x) #1 { 
# | same:21     ~~~~~~~~~~~~~~~~~~~~~~~~
# | same:33                             X~~~~~~~~~~~~~~~~~~ error: no match found
# |         25:  %1 = icmp ne <16 x i8> %x, zeroinitializer 
# | same:33     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |         26:  %cmp = call i1 @llvm.vector.reduce.or.v16i1(<16 x i1> %1) 
# | same:33     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |         27:  ret i1 %cmp 
# | same:33     ~~~~~~~~~~~~~
# |         28: } 
# | same:33     ~~
# |         29:  
# | same:33     ~
# |         30: define i1 @umax_zero_commuted(<16 x i8> %x) #1 { 
# | same:33     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | same:45                                   X~~~~~~~~~~~~~~~~~~ error: no match found
# |         31:  %1 = icmp eq <16 x i8> %x, zeroinitializer 
# | same:45     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |         32:  %cmp = call i1 @llvm.vector.reduce.and.v16i1(<16 x i1> %1) 
# | same:45     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |         33:  ret i1 %cmp 
# | same:45     ~~~~~~~~~~~~~
# |         34: } 
# | same:45     ~~
# |         35:  
# | same:45     ~
# |         36: define i1 @or_nonzero_multiuse(<16 x i8> %x, ptr %out) #1 { 
# | same:45     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | same:57                                    X~~~~~~~~~~~~~~~~~~~~~~~~~~~~ error: no match found
# |         37:  %reduction = call i8 @llvm.vector.reduce.or.v16i8(<16 x i8> %x) 
# | same:57     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |         38:  store i8 %reduction, ptr %out, align 1 
# | same:57     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |         39:  %cmp = icmp ne i8 %reduction, 0 
# | same:57     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |         40:  ret i1 %cmp 
# | same:57     ~~~~~~~~~~~~~
# |         41: } 
# | same:57     ~~
# |          .
# |          .
# |          .
# | >>>>>>
# `-----------------------------
# 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/205622


More information about the llvm-commits mailing list