public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/107515] New: MVE: Generic functions do not accept _Float16 scalars
@ 2022-11-03  9:27 kevin.bracey at alifsemi dot com
  2022-11-10 17:30 ` [Bug target/107515] " stammark at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: kevin.bracey at alifsemi dot com @ 2022-11-03  9:27 UTC (permalink / raw)
  To: gcc-bugs

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
      |         ^~~~~

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-05-18 11:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-03  9:27 [Bug target/107515] New: MVE: Generic functions do not accept _Float16 scalars kevin.bracey at alifsemi dot com
2022-11-10 17:30 ` [Bug target/107515] " stammark at gcc dot gnu.org
2022-11-16 16:35 ` kevin.bracey at alifsemi dot com
2022-11-17 16:56 ` stammark at gcc dot gnu.org
2022-11-21 12:24 ` kevin.bracey at alifsemi dot com
2022-11-28  9:12 ` cvs-commit at gcc dot gnu.org
2022-11-29  8:59 ` kevin.bracey at alifsemi dot com
2022-11-29 13:23 ` stammark at gcc dot gnu.org
2022-11-29 13:29 ` kevin.bracey at alifsemi dot com
2022-12-01 18:37 ` stammark at gcc dot gnu.org
2023-01-16 12:52 ` cvs-commit at gcc dot gnu.org
2023-05-18 10:39 ` cvs-commit at gcc dot gnu.org
2023-05-18 10:43 ` cvs-commit at gcc dot gnu.org
2023-05-18 11:06 ` stammark at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).