Bug 111609

Summary: Zero shift in ARM NEON vshll_n_s8 intrinsic produces an error
Product: gcc Reporter: RP <power>
Component: targetAssignee: Not yet assigned to anyone <unassigned>
Status: NEW ---    
Severity: normal CC: michael.crusoe
Priority: P3 Keywords: assemble-failure
Version: unknown   
Target Milestone: ---   
Host: Target: arm
Build: Known to work:
Known to fail: 12.1.0, 4.5.4 Last reconfirmed: 2023-09-27 00:00:00

Description RP 2023-09-27 08:27:09 UTC
Using this test program:
#include <stdint.h>
#include <arm_neon.h>

void test(int8_t *src, int16_t *dst)
{
int8x8_t nvalue1;
int16x8_t nvalue2;

nvalue1 = vld1_s8(src);
nvalue2 = vshll_n_s8(nvalue1, 0);
vst1q_s16(dst, nvalue2);
}

The compiler produces this error:
test.s:26: Error: immediate value out of range -- `vshll.s8 q8,d16,#0'

Tested on multiple gcc versions.

According to official ARM documentation, zero shift is valid in vshll_n_s8 intrinsic. The same goes for other vshll_n_XXX intrinsics.
Comment 1 Andrew Pinski 2023-09-27 17:46:47 UTC
Confirmed.