[llvm] [X86] Fold nested VGF2P8AFFINEQB instructions (PR #195210)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 8 02:10:08 PDT 2026


github-actions[bot] wrote:

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

* 173993 tests passed
* 3314 tests skipped
* 1 test failed

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

### LLVM
<details>
<summary>LLVM.CodeGen/X86/gfni-funnel-shifts.ll</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/gfni-funnel-shifts.ll -mtriple=x86_64-unknown-unknown -mattr=+sse4.2,+gfni | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/gfni-funnel-shifts.ll --check-prefixes=GFNISSE
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=x86_64-unknown-unknown -mattr=+sse4.2,+gfni
# 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/CodeGen/X86/gfni-funnel-shifts.ll --check-prefixes=GFNISSE
# note: command had no output on stdout or stderr
# RUN: at line 3
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/gfni-funnel-shifts.ll -mtriple=x86_64-unknown-unknown -mattr=+avx,+gfni | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/gfni-funnel-shifts.ll --check-prefixes=GFNIAVX,GFNIAVX1OR2,GFNIAVX1
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=x86_64-unknown-unknown -mattr=+avx,+gfni
# 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/CodeGen/X86/gfni-funnel-shifts.ll --check-prefixes=GFNIAVX,GFNIAVX1OR2,GFNIAVX1
# note: command had no output on stdout or stderr
# RUN: at line 4
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/gfni-funnel-shifts.ll -mtriple=x86_64-unknown-unknown -mattr=+avx2,+gfni | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/gfni-funnel-shifts.ll --check-prefixes=GFNIAVX,GFNIAVX1OR2,GFNIAVX2
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=x86_64-unknown-unknown -mattr=+avx2,+gfni
# 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/CodeGen/X86/gfni-funnel-shifts.ll --check-prefixes=GFNIAVX,GFNIAVX1OR2,GFNIAVX2
# note: command had no output on stdout or stderr
# RUN: at line 5
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc < /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/gfni-funnel-shifts.ll -mtriple=x86_64-unknown-unknown -mattr=+avx512vl,+gfni | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/gfni-funnel-shifts.ll --check-prefixes=GFNIAVX,GFNIAVX512,GFNIAVX512VL
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/llc -mtriple=x86_64-unknown-unknown -mattr=+avx512vl,+gfni
# 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/CodeGen/X86/gfni-funnel-shifts.ll --check-prefixes=GFNIAVX,GFNIAVX512,GFNIAVX512VL
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/gfni-funnel-shifts.ll:682:22: error: GFNIAVX512VL-NEXT: expected string not found in input
# | ; GFNIAVX512VL-NEXT: vpshufb %ymm2, %ymm7, %ymm3
# |                      ^
# | <stdin>:394:28: note: scanning from here
# |  vpandn %ymm3, %ymm2, %ymm2
# |                            ^
# | <stdin>:395:2: note: possible intended match here
# |  vpshufb %ymm2, %ymm5, %ymm3
# |  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/gfni-funnel-shifts.ll:1611:22: error: GFNIAVX512VL-NEXT: expected string not found in input
# | ; GFNIAVX512VL-NEXT: vgf2p8affineqb $0, {{\.?LCPI[0-9]+_[0-9]+}}(%rip){1to8}, %zmm1, %zmm1 # [0,128,64,32,16,8,4,2,0,128,64,32,16,8,4,2,0,128,64,32,16,8,4,2,0,128,64,32,16,8,4,2,0,128,64,32,16,8,4,2,0,128,64,32,16,8,4,2,0,128,64,32,16,8,4,2,0,128,64,32,16,8,4,2]
# |                      ^
# | <stdin>:894:38: note: scanning from here
# |  vinserti64x4 $1, %ymm4, %zmm2, %zmm2
# |                                      ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/llvm/test/CodeGen/X86/gfni-funnel-shifts.ll
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             .
# |             .
# |             .
# |           389:  vbroadcasti128 .LCPI8_7(%rip), %ymm7 # ymm7 = [72909780498219007,0,72909780498219007,0] 
# |           390:  # ymm7 = mem[0,1,0,1] 
# |           391:  vpshufb %ymm4, %ymm7, %ymm4 
# |           392:  vpand %ymm4, %ymm0, %ymm0 
# |           393:  vgf2p8mulb %ymm6, %ymm0, %ymm0 
# |           394:  vpandn %ymm3, %ymm2, %ymm2 
# | next:682'0                                X error: no match found
# |           395:  vpshufb %ymm2, %ymm5, %ymm3 
# | next:682'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# | next:682'1      ?                            possible intended match
# |           396:  vpshufb %ymm2, %ymm7, %ymm2 
# | next:682'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           397:  vgf2p8affineqb $0, .LCPI8_8(%rip){1to4}, %ymm1, %ymm1 # [2,4,8,16,32,64,128,0,2,4,8,16,32,64,128,0,2,4,8,16,32,64,128,0,2,4,8,16,32,64,128,0] 
# | next:682'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           398:  vpand %ymm2, %ymm1, %ymm1 
# | next:682'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           399:  vgf2p8mulb %ymm3, %ymm1, %ymm1 
# | next:682'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           400:  vgf2p8affineqb $0, .LCPI8_9(%rip){1to4}, %ymm1, %ymm1 # [1,2,4,8,16,32,64,128,1,2,4,8,16,32,64,128,1,2,4,8,16,32,64,128,1,2,4,8,16,32,64,128] 
# | next:682'0     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# |           889:  vpxor %ymm3, %ymm2, %ymm2 
# |           890:  vpshufb %ymm2, %ymm5, %ymm3 
# |           891:  vinserti64x4 $1, %ymm6, %zmm3, %zmm3 
# |           892:  vpshufb %ymm4, %ymm7, %ymm4 
# |           893:  vpshufb %ymm2, %ymm7, %ymm2 
# |           894:  vinserti64x4 $1, %ymm4, %zmm2, %zmm2 
# | next:1611                                           X error: no match found
# |           895:  vgf2p8affineqb $0, .LCPI16_8(%rip){1to8}, %zmm1, %zmm1 # [2,4,8,16,32,64,128,0,2,4,8,16,32,64,128,0,2,4,8,16,32,64,128,0,2,4,8,16,32,64,128,0,2,4,8,16,32,64,128,0,2,4,8,16,32,64,128,0,2,4,8,16,32,64,128,0,2,4,8,16,32,64,128,0] 
# | next:1611      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           896:  vpandq %zmm2, %zmm1, %zmm1 
# | next:1611      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           897:  vgf2p8mulb %zmm3, %zmm1, %zmm1 
# | next:1611      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           898:  vgf2p8affineqb $0, .LCPI16_9(%rip){1to8}, %zmm1, %zmm1 # [1,2,4,8,16,32,64,128,1,2,4,8,16,32,64,128,1,2,4,8,16,32,64,128,1,2,4,8,16,32,64,128,1,2,4,8,16,32,64,128,1,2,4,8,16,32,64,128,1,2,4,8,16,32,64,128,1,2,4,8,16,32,64,128] 
# | next:1611      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |           899:  vporq %zmm1, %zmm0, %zmm0 
# | next:1611      ~~~~~~~~~~~~~~~~~~~~~~~~~~~
# |             .
# |             .
# |             .
# | >>>>>>
# `-----------------------------
# 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/195210


More information about the llvm-commits mailing list