[clang] [CIR] max-across-vector (vmaxv_*) intrinsics (PR #194401)

Andrzej WarzyƄski via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 29 01:15:00 PDT 2026


banach-space wrote:

> Was running into this issue,
> 
> ```
> executed command: /Users/kartikohlan/llvm-project/build-release/bin/clang -cc1 -internal-isystem /Users/kartikohlan/llvm-project/build-release/lib/clang/23/include -nostdsysteminc -triple arm64-none-linux-gnu -target-feature +neon -disable-O0-optnone -flax-vector-conversions=none -emit-llvm -o - /Users/kartikohlan/llvm-project/clang/test/CodeGen/AArch64/neon/intrinsics.c
> # .---command stderr------------
> # | /Users/kartikohlan/llvm-project/clang/test/CodeGen/AArch64/neon/intrinsics.c:171:10: error: '__builtin_neon_vmaxvq_f16' needs target feature fullfp16,neon
> # |   171 |   return vmaxvq_f16(a);
> # |       |          ^
> # | /Users/kartikohlan/llvm-project/build-release/lib/clang/23/include/arm_neon.h:45577:41: note: expanded from macro 'vmaxvq_f16'
> # |  45577 |   __ret = __builtin_bit_cast(float16_t, __builtin_neon_vmaxvq_f16(__builtin_bit_cast(int8x16_t, __s0))); \
> # |        |                                         ^
> # | 1 error generated.
> ```
> 
> so i added` -target-feature +fullfp16` in the RUN line, just wasn;t sure if we can edit the RUN line but the older test case file had this.

Tests requiring `+fullfp16` are located in https://github.com/llvm/llvm-project/blob/7aa2b040236bfa8b60ebec69af60f5a334ee160e/clang/test/CodeGen/AArch64/neon/fullfp16.c. 

In fact, `vmaxvq_f16` comes from a dedicated section in the spec:
* https://arm-software.github.io/acle/neon_intrinsics/advsimd.html#maximum-2

rather than:
* https://arm-software.github.io/acle/neon_intrinsics/advsimd.html#maximum-across-vector

Please make sure not to mix groups from the spec and to label tests correctly.

https://github.com/llvm/llvm-project/pull/194401


More information about the cfe-commits mailing list