[Bug target/96125] New: __attribute__((target("cpu=power10,mma"))) does not set TARGET_MMA
bergner at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 8 20:08:01 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96125
Bug ID: 96125
Summary: __attribute__((target("cpu=power10,mma"))) does not
set TARGET_MMA
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: bergner at gcc dot gnu.org
Target Milestone: ---
__attribute__((target("cpu=power10,mma"))) should set TARGET_MMA within the
compiler. It doesn't, so calling our MMA built-ins results in errors. In the
test case below, we correctly emit a ".machine power10" so the first function
is fine. We only seem to be missing the setting of TARGET_MMA.
bergner@marlin:~/$ cat bug.c
void
__attribute__((target("cpu=power10,mma")))
foo (long *dst)
{
long e = -1;
asm ("pli %0,%1" : "+r" (e) : "n" (0x12345));
*dst = e;
}
void
__attribute__((target("cpu=power10,mma")))
bar (void *dst)
{
__vector_quad acc;
__builtin_mma_xxsetaccz (&acc);
__builtin_mma_disassemble_acc (dst, &acc);
}
bergner@marlin:~/$ gcc -S -O2 -mcpu=power8 bug.c
bug.c: In function ‘bar’:
bug.c:14:3: error: unknown type name ‘__vector_quad’
14 | __vector_quad acc;
| ^~~~~~~~~~~~~
bug.c:15:3: warning: implicit declaration of function
‘__builtin_mma_xxsetaccz’; did you mean ‘__builtin_va_start’?
[-Wimplicit-function-declaration]
15 | __builtin_mma_xxsetaccz (&acc);
| ^~~~~~~~~~~~~~~~~~~~~~~
| __builtin_va_start
bug.c:16:3: warning: implicit declaration of function
‘__builtin_mma_disassemble_acc’ [-Wimplicit-function-declaration]
16 | __builtin_mma_disassemble_acc (dst, &acc);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
More information about the Gcc-bugs
mailing list