[llvm] [SDAG] Fix incorrect usage of VECREDUCE_ADD (PR #171459)

via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 9 08:08:02 PST 2025


github-actions[bot] wrote:

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

* 128477 tests passed
* 2793 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/X86/vector-compress.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -mtriple=x86_64 -mattr=+avx2                           < C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\vector-compress.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\vector-compress.ll --check-prefixes=CHECK,AVX2
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple=x86_64 -mattr=+avx2
# 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\CodeGen\X86\vector-compress.ll' --check-prefixes=CHECK,AVX2
# note: command had no output on stdout or stderr
# RUN: at line 3
c:\_work\llvm-project\llvm-project\build\bin\llc.exe -mtriple=x86_64 -mattr=+avx512f                        < C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\vector-compress.ll | c:\_work\llvm-project\llvm-project\build\bin\filecheck.exe C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\vector-compress.ll --check-prefixes=CHECK,AVX512F
# executed command: 'c:\_work\llvm-project\llvm-project\build\bin\llc.exe' -mtriple=x86_64 -mattr=+avx512f
# 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\CodeGen\X86\vector-compress.ll' --check-prefixes=CHECK,AVX512F
# .---command stderr------------
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\vector-compress.ll:1586:17: error: AVX512F-NEXT: expected string not found in input
# | ; AVX512F-NEXT: kshiftrw $8, %k2, %k0
# |                 ^
# | <stdin>:254:23: note: scanning from here
# |  vpmovdb %zmm3, (%rsp)
# |                       ^
# | <stdin>:261:2: note: possible intended match here
# |  vpextrd $1, %xmm3, %eax
# |  ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\vector-compress.ll:2420:17: error: AVX512F-NEXT: is not on the line after the previous match
# | ; AVX512F-NEXT: kmovw %k1, %k3
# |                 ^
# | <stdin>:364:2: note: 'next' match was here
# |  kmovw %k1, %k3
# |  ^
# | <stdin>:316:21: note: previous match ended here
# |  kandw %k1, %k0, %k0
# |                     ^
# | <stdin>:317:1: note: non-matching line after previous match is here
# |  kmovw %k1, %k6
# | ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\vector-compress.ll:3276:17: error: AVX512F-NEXT: expected string not found in input
# | ; AVX512F-NEXT: vpmovsxbd %xmm1, %zmm1
# |                 ^
# | <stdin>:833:28: note: scanning from here
# |  vptestmd %zmm5, %zmm5, %k1
# |                            ^
# | <stdin>:834:2: note: possible intended match here
# |  vpmovsxbd %xmm1, %zmm5
# |  ^
# | C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\vector-compress.ll:3796:17: error: AVX512F-NEXT: is not on the line after the previous match
# | ; AVX512F-NEXT: kmovw %k1, %k3
# |                 ^
# | <stdin>:939:2: note: 'next' match was here
# |  kmovw %k1, %k3
# |  ^
# | <stdin>:891:21: note: previous match ended here
# |  kandw %k1, %k0, %k0
# |                     ^
# | <stdin>:892:1: note: non-matching line after previous match is here
# |  kmovw %k1, %k6
# | ^
# | 
# | Input file: <stdin>
# | Check file: C:\_work\llvm-project\llvm-project\llvm\test\CodeGen\X86\vector-compress.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |              .
# |              .
# |              .
# |            249:  vpmovsxbd %xmm1, %zmm3 
# |            250:  vpslld $31, %zmm3, %zmm3 
# |            251:  vptestmd %zmm3, %zmm3, %k2 
# |            252:  vpmovzxbd %xmm0, %zmm3 # zmm3 = xmm0[0],zero,zero,zero,xmm0[1],zero,zero,zero,xmm0[2],zero,zero,zero,xmm0[3],zero,zero,zero,xmm0[4],zero,zero,zero,xmm0[5],zero,zero,zero,xmm0[6],zero,zero,zero,xmm0[7],zero,zero,zero,xmm0[8],zero,zero,zero,xmm0[9],zero,zero,zero,xmm0[10],zero,zero,zero,xmm0[11],zero,zero,zero,xmm0[12],zero,zero,zero,xmm0[13],zero,zero,zero,xmm0[14],zero,zero,zero,xmm0[15],zero,zero,zero 
# |            253:  vpcompressd %zmm3, %zmm3 {%k2} {z} 
# |            254:  vpmovdb %zmm3, (%rsp) 
# | next:1586'0                           X error: no match found
# |            255:  vpand .LCPI14_0(%rip), %xmm1, %xmm3 
# | next:1586'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            256:  vpmovzxbd %xmm3, %zmm3 # zmm3 = xmm3[0],zero,zero,zero,xmm3[1],zero,zero,zero,xmm3[2],zero,zero,zero,xmm3[3],zero,zero,zero,xmm3[4],zero,zero,zero,xmm3[5],zero,zero,zero,xmm3[6],zero,zero,zero,xmm3[7],zero,zero,zero,xmm3[8],zero,zero,zero,xmm3[9],zero,zero,zero,xmm3[10],zero,zero,zero,xmm3[11],zero,zero,zero,xmm3[12],zero,zero,zero,xmm3[13],zero,zero,zero,xmm3[14],zero,zero,zero,xmm3[15],zero,zero,zero 
# | next:1586'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            257:  vextracti64x4 $1, %zmm3, %ymm4 
# | next:1586'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            258:  vpaddd %ymm4, %ymm3, %ymm3 
# | next:1586'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            259:  vextracti128 $1, %ymm3, %xmm4 
# | next:1586'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            260:  vpaddd %xmm4, %xmm3, %xmm3 
# | next:1586'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            261:  vpextrd $1, %xmm3, %eax 
# | next:1586'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:1586'1      ?                        possible intended match
# |            262:  vmovd %xmm3, %ecx 
# | next:1586'0     ~~~~~~~~~~~~~~~~~~~
# |            263:  addl %eax, %ecx 
# | next:1586'0     ~~~~~~~~~~~~~~~~~
# |            264:  vpextrd $2, %xmm3, %eax 
# | next:1586'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |            265:  vpextrd $3, %xmm3, %edx 
# | next:1586'0     ~~~~~~~~~~~~~~~~~~~~~~~~~
# |            266:  addl %eax, %edx 
# | next:1586'0     ~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |            359:  kshiftrw $9, %k1, %k1 
# |            360:  korw %k1, %k0, %k0 
# |            361:  movw $-129, %ax 
# |            362:  kmovw %eax, %k1 
# |            363:  kandw %k1, %k0, %k0 
# |            364:  kmovw %k1, %k3 
# | next:2420        !~~~~~~~~~~~~~  error: match on wrong line
# |            365:  kmovw %k1, 44(%rsp) # 2-byte Spill 
# |            366:  movzbl 408(%rbp), %eax 
# |            367:  kmovw %eax, %k1 
# |            368:  kshiftlw $15, %k1, %k1 
# |            369:  kshiftrw $8, %k1, %k1 
# |              .
# |              .
# |              .
# |            828:  vpmovzxbw %xmm1, %ymm3 # ymm3 = xmm1[0],zero,xmm1[1],zero,xmm1[2],zero,xmm1[3],zero,xmm1[4],zero,xmm1[5],zero,xmm1[6],zero,xmm1[7],zero,xmm1[8],zero,xmm1[9],zero,xmm1[10],zero,xmm1[11],zero,xmm1[12],zero,xmm1[13],zero,xmm1[14],zero,xmm1[15],zero 
# |            829:  vextracti128 $1, %ymm1, %xmm5 
# |            830:  vpmovzxbw %xmm5, %ymm4 # ymm4 = xmm5[0],zero,xmm5[1],zero,xmm5[2],zero,xmm5[3],zero,xmm5[4],zero,xmm5[5],zero,xmm5[6],zero,xmm5[7],zero,xmm5[8],zero,xmm5[9],zero,xmm5[10],zero,xmm5[11],zero,xmm5[12],zero,xmm5[13],zero,xmm5[14],zero,xmm5[15],zero 
# |            831:  vpmovsxbd %xmm5, %zmm5 
# |            832:  vpslld $31, %zmm5, %zmm5 
# |            833:  vptestmd %zmm5, %zmm5, %k1 
# | next:3276'0                                X error: no match found
# |            834:  vpmovsxbd %xmm1, %zmm5 
# | next:3276'0     ~~~~~~~~~~~~~~~~~~~~~~~~
# | next:3276'1      ?                       possible intended match
# |            835:  vpslld $31, %zmm5, %zmm5 
# | next:3276'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            836:  vptestmd %zmm5, %zmm5, %k2 
# | next:3276'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            837:  vpmovzxwd %ymm0, %zmm5 # zmm5 = ymm0[0],zero,ymm0[1],zero,ymm0[2],zero,ymm0[3],zero,ymm0[4],zero,ymm0[5],zero,ymm0[6],zero,ymm0[7],zero,ymm0[8],zero,ymm0[9],zero,ymm0[10],zero,ymm0[11],zero,ymm0[12],zero,ymm0[13],zero,ymm0[14],zero,ymm0[15],zero 
# | next:3276'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            838:  vpcompressd %zmm5, %zmm5 {%k2} {z} 
# | next:3276'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |            839:  vpmovdw %zmm5, (%rsp) 
# | next:3276'0     ~~~~~~~~~~~~~~~~~~~~~~~
# |              .
# |              .
# |              .
# |            934:  kshiftrw $9, %k1, %k1 
# |            935:  korw %k1, %k0, %k0 
# |            936:  movw $-129, %ax 
# |            937:  kmovw %eax, %k1 
# |            938:  kandw %k1, %k0, %k0 
# |            939:  kmovw %k1, %k3 
# | next:3796        !~~~~~~~~~~~~~  error: match on wrong line
# |            940:  kmovw %k1, 44(%rsp) # 2-byte Spill 
# |            941:  movzbl 408(%rbp), %eax 
# |            942:  kmovw %eax, %k1 
# |            943:  kshiftlw $15, %k1, %k1 
# |            944:  kshiftrw $8, %k1, %k1 
# |              .
# |              .
# |              .
# | >>>>>>
# `-----------------------------
# 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/171459


More information about the llvm-commits mailing list