https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107515
Bug ID: 107515
Summary: MVE: Generic functions do not accept _Float16 scalars
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: kevin.bracey at alifsemi dot com
Target Milestone: ---
Compiling C code, generic functions taking floating point scalars in arm_mve.h
do not accept `_Float16` values.
// Using gcc -mcpu=cortex-m55 -O2
// Uploaded at https://godbolt.org/z/7jrqWWroY
#include <arm_mve.h>
void test(void)
{
float16x8_t x;
x = vmulq(x, 0.5); // ok
x = vmulq(x, 0.5f); // ok
x = vmulq(x, (__fp16) 0.5); // ok
x = vmulq(x, 0.15f16); // rejected
x = vmulq(x, (_Float16) 0.15); // rejected
}
Output:
<source>:10:9: error: '_Generic' selector of type 'int (*)[4][39]' is not
compatible with any association
10 | x = vmulq(x, 0.15f16); // rejected
| ^~~~~
<source>:11:9: error: '_Generic' selector of type 'int (*)[4][39]' is not
compatible with any association
11 | x = vmulq(x, (_Float16) 0.15); // rejected
| ^~~~~