[clang] [llvm] [RISCV][P-ext] Support Packed "Q-format" Multiply Parts Accumulate (PR #217918)

via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 23 07:38:50 PDT 2026


github-actions[bot] wrote:

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

* 181151 tests passed
* 3711 tests skipped
* 2 tests failed

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

### cross-project-tests
<details>
<summary>cross-project-tests.intrinsic-header-tests/riscv_packed_simd.c</summary>

```
Exit Code: 2

Command Output (stdout):
--
# RUN: at line 4
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c -O2 -S -o - --target=riscv32    -menable-experimental-extensions -march=rv32i_p0p21    -Werror -Wextra -Xclang -verify    | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c --check-prefixes=CHECK,RV32
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c -O2 -S -o - --target=riscv32 -menable-experimental-extensions -march=rv32i_p0p21 -Werror -Wextra -Xclang -verify
# .---command stderr------------
# | error: 'expected-error' diagnostics seen but not expected: 
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 781: too few arguments provided to function-like macro invocation
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 782: too few arguments provided to function-like macro invocation
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 781: unknown type name '__packed_ternary_builtin'
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 783: too few arguments provided to function-like macro invocation
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 782: expected ';' after top level declarator
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 784: too few arguments provided to function-like macro invocation
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 803: too few arguments provided to function-like macro invocation
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 804: too few arguments provided to function-like macro invocation
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 803: unknown type name '__packed_ternary_builtin'
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 805: too few arguments provided to function-like macro invocation
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 804: expected ';' after top level declarator
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 806: too few arguments provided to function-like macro invocation
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 807: too few arguments provided to function-like macro invocation
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 808: too few arguments provided to function-like macro invocation
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 809: too few arguments provided to function-like macro invocation
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 810: too few arguments provided to function-like macro invocation
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c Line 2718: call to undeclared function '__riscv_pmhacc_i16x2'; ISO C99 and later do not support implicit function declarations
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c Line 2718: returning 'int' from a function with incompatible result type 'int16x2_t' (vector of 2 'int16_t' values)
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c Line 2724: call to undeclared function '__riscv_pmhracc_i16x2'; ISO C99 and later do not support implicit function declarations
# |   (frontend): too many errors emitted, stopping now
# | error: 'expected-note' diagnostics seen but not expected: 
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 288: macro '__packed_ternary_builtin' defined here
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 288: macro '__packed_ternary_builtin' defined here
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 288: macro '__packed_ternary_builtin' defined here
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 288: macro '__packed_ternary_builtin' defined here
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 288: macro '__packed_ternary_builtin' defined here
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 288: macro '__packed_ternary_builtin' defined here
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 288: macro '__packed_ternary_builtin' defined here
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 288: macro '__packed_ternary_builtin' defined here
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 288: macro '__packed_ternary_builtin' defined here
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 288: macro '__packed_ternary_builtin' defined here
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 288: macro '__packed_ternary_builtin' defined here
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h Line 288: macro '__packed_ternary_builtin' defined here
# |   File /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c Line 2724: did you mean '__riscv_pmhraccsu_i16x2'?
# |   Line 786: '__riscv_pmhraccsu_i16x2' declared here
# | 34 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c --check-prefixes=CHECK,RV32
# .---command stderr------------
# | FileCheck error: '<stdin>' is empty.
# | FileCheck command line:  /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/cross-project-tests/intrinsic-header-tests/riscv_packed_simd.c --check-prefixes=CHECK,RV32
# `-----------------------------
# error: command failed with exit status: 2

--

```
</details>

### Clang
<details>
<summary>Clang.CodeGen/RISCV/rvp-intrinsics.c</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 2
/home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include -nostdsysteminc -triple riscv32 -target-feature +experimental-p    -disable-O0-optnone -emit-llvm -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/RISCV/rvp-intrinsics.c  | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -passes=sroa,instcombine | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/FileCheck /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/RISCV/rvp-intrinsics.c --check-prefix=RV32
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/clang -cc1 -internal-isystem /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include -nostdsysteminc -triple riscv32 -target-feature +experimental-p -disable-O0-optnone -emit-llvm -o - /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/RISCV/rvp-intrinsics.c
# .---command stderr------------
# | In file included from /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/RISCV/rvp-intrinsics.c:9:
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:781:79: error: too few arguments provided to function-like macro invocation
# |   781 | __packed_ternary_builtin(pmhacc_i16x2, int16x2_t, __builtin_riscv_pmhacc_i16x2)
# |       |                                                                               ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:288:9: note: macro '__packed_ternary_builtin' defined here
# |   288 | #define __packed_ternary_builtin(name, rty, ty, builtin)                        \
# |       |         ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:782:81: error: too few arguments provided to function-like macro invocation
# |   782 | __packed_ternary_builtin(pmhracc_i16x2, int16x2_t, __builtin_riscv_pmhracc_i16x2)
# |       |                                                                                 ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:288:9: note: macro '__packed_ternary_builtin' defined here
# |   288 | #define __packed_ternary_builtin(name, rty, ty, builtin)                        \
# |       |         ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:781:1: error: unknown type name '__packed_ternary_builtin'
# |   781 | __packed_ternary_builtin(pmhacc_i16x2, int16x2_t, __builtin_riscv_pmhacc_i16x2)
# |       | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:783:82: error: too few arguments provided to function-like macro invocation
# |   783 | __packed_ternary_builtin(pmhaccu_u16x2, uint16x2_t, __builtin_riscv_pmhaccu_u16x2)
# |       |                                                                                  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:288:9: note: macro '__packed_ternary_builtin' defined here
# |   288 | #define __packed_ternary_builtin(name, rty, ty, builtin)                        \
# |       |         ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:782:25: error: expected ';' after top level declarator
# |   782 | __packed_ternary_builtin(pmhracc_i16x2, int16x2_t, __builtin_riscv_pmhracc_i16x2)
# |       |                         ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:784:84: error: too few arguments provided to function-like macro invocation
# |   784 | __packed_ternary_builtin(pmhraccu_u16x2, uint16x2_t, __builtin_riscv_pmhraccu_u16x2)
# |       |                                                                                    ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:288:9: note: macro '__packed_ternary_builtin' defined here
# |   288 | #define __packed_ternary_builtin(name, rty, ty, builtin)                        \
# |       |         ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:803:79: error: too few arguments provided to function-like macro invocation
# |   803 | __packed_ternary_builtin(pmhacc_i16x4, int16x4_t, __builtin_riscv_pmhacc_i16x4)
# |       |                                                                               ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:288:9: note: macro '__packed_ternary_builtin' defined here
# |   288 | #define __packed_ternary_builtin(name, rty, ty, builtin)                        \
# |       |         ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:804:79: error: too few arguments provided to function-like macro invocation
# |   804 | __packed_ternary_builtin(pmhacc_i32x2, int32x2_t, __builtin_riscv_pmhacc_i32x2)
# |       |                                                                               ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:288:9: note: macro '__packed_ternary_builtin' defined here
# |   288 | #define __packed_ternary_builtin(name, rty, ty, builtin)                        \
# |       |         ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:803:1: error: unknown type name '__packed_ternary_builtin'
# |   803 | __packed_ternary_builtin(pmhacc_i16x4, int16x4_t, __builtin_riscv_pmhacc_i16x4)
# |       | ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:805:81: error: too few arguments provided to function-like macro invocation
# |   805 | __packed_ternary_builtin(pmhracc_i16x4, int16x4_t, __builtin_riscv_pmhracc_i16x4)
# |       |                                                                                 ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:288:9: note: macro '__packed_ternary_builtin' defined here
# |   288 | #define __packed_ternary_builtin(name, rty, ty, builtin)                        \
# |       |         ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:804:25: error: expected ';' after top level declarator
# |   804 | __packed_ternary_builtin(pmhacc_i32x2, int32x2_t, __builtin_riscv_pmhacc_i32x2)
# |       |                         ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:806:81: error: too few arguments provided to function-like macro invocation
# |   806 | __packed_ternary_builtin(pmhracc_i32x2, int32x2_t, __builtin_riscv_pmhracc_i32x2)
# |       |                                                                                 ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:288:9: note: macro '__packed_ternary_builtin' defined here
# |   288 | #define __packed_ternary_builtin(name, rty, ty, builtin)                        \
# |       |         ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:807:82: error: too few arguments provided to function-like macro invocation
# |   807 | __packed_ternary_builtin(pmhaccu_u16x4, uint16x4_t, __builtin_riscv_pmhaccu_u16x4)
# |       |                                                                                  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:288:9: note: macro '__packed_ternary_builtin' defined here
# |   288 | #define __packed_ternary_builtin(name, rty, ty, builtin)                        \
# |       |         ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:808:82: error: too few arguments provided to function-like macro invocation
# |   808 | __packed_ternary_builtin(pmhaccu_u32x2, uint32x2_t, __builtin_riscv_pmhaccu_u32x2)
# |       |                                                                                  ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:288:9: note: macro '__packed_ternary_builtin' defined here
# |   288 | #define __packed_ternary_builtin(name, rty, ty, builtin)                        \
# |       |         ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:809:84: error: too few arguments provided to function-like macro invocation
# |   809 | __packed_ternary_builtin(pmhraccu_u16x4, uint16x4_t, __builtin_riscv_pmhraccu_u16x4)
# |       |                                                                                    ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:288:9: note: macro '__packed_ternary_builtin' defined here
# |   288 | #define __packed_ternary_builtin(name, rty, ty, builtin)                        \
# |       |         ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:810:84: error: too few arguments provided to function-like macro invocation
# |   810 | __packed_ternary_builtin(pmhraccu_u32x2, uint32x2_t, __builtin_riscv_pmhraccu_u32x2)
# |       |                                                                                    ^
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/build/lib/clang/24/include/riscv_packed_simd.h:288:9: note: macro '__packed_ternary_builtin' defined here
# |   288 | #define __packed_ternary_builtin(name, rty, ty, builtin)                        \
# |       |         ^
# | 16 errors generated.
# `-----------------------------
# error: command failed with exit status: 1
# executed command: /home/gha/actions-runner/_work/llvm-project/llvm-project/build/bin/opt -S -passes=sroa,instcombine
# 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/clang/test/CodeGen/RISCV/rvp-intrinsics.c --check-prefix=RV32
# .---command stderr------------
# | /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/RISCV/rvp-intrinsics.c:13:16: error: RV32-LABEL: expected string not found in input
# | // RV32-LABEL: define dso_local i32 @test_pmv_s_u8x4(
# |                ^
# | <stdin>:1:1: note: scanning from here
# | ; ModuleID = '<stdin>'
# | ^
# | <stdin>:2:5: note: possible intended match here
# | source_filename = "<stdin>"
# |     ^
# | 
# | Input file: <stdin>
# | Check file: /home/gha/actions-runner/_work/llvm-project/llvm-project/clang/test/CodeGen/RISCV/rvp-intrinsics.c
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<<<<<
# |             1: ; ModuleID = '<stdin>' 
# | label:13'0    {                         search range start (exclusive)
# | label:13'1                              error: no match found in search range
# |             2: source_filename = "<stdin>" 
# | label:13'2         ?                         possible intended match
# | label:13'3                                 } 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/217918


More information about the llvm-commits mailing list