https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121749
Bug ID: 121749
Summary: [14/15/16 Regression] aarch64: Invalid assembly with
vqshrn intrinsic since r14-1886-gd20b2ad845876e
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: acoplan at gcc dot gnu.org
Target Milestone: ---
The following fails:
$ cat t.c
#include <arm_neon.h>
uint32_t foo(uint64_t v0) {
return vqshrnd_n_u64(vshrd_n_u64(v0, 26), 7);
}
$ gcc/xgcc -B gcc -c t.c -O2
/tmp/ccGC4KcV.s: Assembler messages:
/tmp/ccGC4KcV.s:12: Error: immediate value out of range 1 to 32 at operand 3 --
`uqshrn s31,d31,33'
the assembler correctly rejects GCC's output, which is:
foo:
fmov d31, x0
uqshrn s31, d31, 33
fmov w0, s31
ret
this started with r14-1886-gd20b2ad845876eec0ee80a3933ad49f9f6c4ee30, before
which we used to generate (in GCC 13):
foo:
fmov d0, x0
ushr d0, d0, 26
uqshrn s0, d0, 7
fmov w0, s0
ret