public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/96125] New: __attribute__((target("cpu=power10,mma"))) does not set TARGET_MMA
@ 2020-07-08 20:08 bergner at gcc dot gnu.org
  2020-07-08 20:10 ` [Bug target/96125] " bergner at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: bergner at gcc dot gnu.org @ 2020-07-08 20:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

end of thread, other threads:[~2020-07-10 15:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08 20:08 [Bug target/96125] New: __attribute__((target("cpu=power10,mma"))) does not set TARGET_MMA bergner at gcc dot gnu.org
2020-07-08 20:10 ` [Bug target/96125] " bergner at gcc dot gnu.org
2020-07-08 20:55 ` bergner at gcc dot gnu.org
2020-07-08 22:09 ` bergner at gcc dot gnu.org
2020-07-09 20:59 ` cvs-commit at gcc dot gnu.org
2020-07-09 23:20 ` bergner at gcc dot gnu.org
2020-07-10 15:12 ` cvs-commit at gcc dot gnu.org
2020-07-10 15:29 ` bergner 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).