public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/96808] New: MMA built-in dies with incorrect sharing of tree nodes error
@ 2020-08-26 21:30 bergner at gcc dot gnu.org
  2020-08-26 21:31 ` [Bug target/96808] " bergner at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: bergner at gcc dot gnu.org @ 2020-08-26 21:30 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96808

            Bug ID: 96808
           Summary: MMA built-in dies with incorrect sharing of tree nodes
                    error
           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: ---

bergner@pike:~/$ cat bug.c 
void
test (__vector_quad *dst, vector unsigned char vc)
{
  __vector_quad vq[2];
  __builtin_mma_xxsetaccz(&vq[1]);
  __builtin_mma_xvf32gerpp(&vq[1], vc, vc);
  *dst = vq[1];
}

bergner@pike:~/$ gcc -S -O2 -mcpu=power10 bug.c 
bug.c: In function ‘test’:
bug.c:2:1: error: incorrect sharing of tree nodes
    2 | test (__vector_quad *dst, vector unsigned char vc)
      | ^~~~
MEM[(__vector_quad *)&vq + 64B]
MEM[(__vector_quad *)&vq + 64B] = _4;
during GIMPLE pass: cfg
bug.c:2:1: internal compiler error: verify_gimple failed
0x11337297 verify_gimple_in_cfg(function*, bool)
        /home/bergner/gcc/gcc-fsf-mainline-bug/gcc/tree-cfg.c:5491
0x10ffb54f execute_function_todo
        /home/bergner/gcc/gcc-fsf-mainline-bug/gcc/passes.c:1992
0x10ff9da3 do_per_function
        /home/bergner/gcc/gcc-fsf-mainline-bug/gcc/passes.c:1640
0x10ffb867 execute_todo
        /home/bergner/gcc/gcc-fsf-mainline-bug/gcc/passes.c:2046
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

This is a bug in rs6000_gimple_fold_mma_builtin not expecting to handle an
array of accumulators.  Mine.  This dies on trunk and GCC 10.

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

* [Bug target/96808] MMA built-in dies with incorrect sharing of tree nodes error
  2020-08-26 21:30 [Bug target/96808] New: MMA built-in dies with incorrect sharing of tree nodes error bergner at gcc dot gnu.org
@ 2020-08-26 21:31 ` bergner at gcc dot gnu.org
  2020-09-01 18:50 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bergner at gcc dot gnu.org @ 2020-08-26 21:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96808

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |bergner at gcc dot gnu.org
             Target|                            |powerpc*-*-*
   Target Milestone|---                         |11.0
                 CC|                            |segher at gcc dot gnu.org,
                   |                            |wschmidt at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2020-08-26

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

* [Bug target/96808] MMA built-in dies with incorrect sharing of tree nodes error
  2020-08-26 21:30 [Bug target/96808] New: MMA built-in dies with incorrect sharing of tree nodes error bergner at gcc dot gnu.org
  2020-08-26 21:31 ` [Bug target/96808] " bergner at gcc dot gnu.org
@ 2020-09-01 18:50 ` cvs-commit at gcc dot gnu.org
  2020-09-01 18:53 ` bergner at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-01 18:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96808

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Peter Bergner <bergner@gcc.gnu.org>:

https://gcc.gnu.org/g:8bc0f24d7a20d89383859907b875a26ce59dc6c8

commit r11-2970-g8bc0f24d7a20d89383859907b875a26ce59dc6c8
Author: Peter Bergner <bergner@linux.ibm.com>
Date:   Tue Sep 1 13:47:44 2020 -0500

    rs6000: MMA built-in dies with incorrect sharing of tree nodes error

    When we expand our MMA built-ins into gimple, we erroneously reused the
    accumulator memory reference for both the source input value as well as
    the destination output value.  This led to a tree sharing error.
    The solution is to create separate memory references for the input
    and output values.

    2020-09-01  Peter Bergner  <bergner@linux.ibm.com>

    gcc/
            PR target/96808
            * config/rs6000/rs6000-call.c (rs6000_gimple_fold_mma_builtin): Do
not
            reuse accumulator memory reference for source and destination
accesses.

    gcc/testsuite/
            PR target/96808
            * gcc.target/powerpc/pr96808.c: New test.

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

* [Bug target/96808] MMA built-in dies with incorrect sharing of tree nodes error
  2020-08-26 21:30 [Bug target/96808] New: MMA built-in dies with incorrect sharing of tree nodes error bergner at gcc dot gnu.org
  2020-08-26 21:31 ` [Bug target/96808] " bergner at gcc dot gnu.org
  2020-09-01 18:50 ` cvs-commit at gcc dot gnu.org
@ 2020-09-01 18:53 ` bergner at gcc dot gnu.org
  2020-09-01 18:54 ` bergner at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bergner at gcc dot gnu.org @ 2020-09-01 18:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96808

--- Comment #2 from Peter Bergner <bergner at gcc dot gnu.org> ---
Fixed on trunk.  I'll backport the fix to GCC 10 after a little burn in on
trunk.

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

* [Bug target/96808] MMA built-in dies with incorrect sharing of tree nodes error
  2020-08-26 21:30 [Bug target/96808] New: MMA built-in dies with incorrect sharing of tree nodes error bergner at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-09-01 18:53 ` bergner at gcc dot gnu.org
@ 2020-09-01 18:54 ` bergner at gcc dot gnu.org
  2020-09-03 15:10 ` cvs-commit at gcc dot gnu.org
  2020-09-03 15:26 ` bergner at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: bergner at gcc dot gnu.org @ 2020-09-01 18:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96808

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|11.0                        |10.3

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

* [Bug target/96808] MMA built-in dies with incorrect sharing of tree nodes error
  2020-08-26 21:30 [Bug target/96808] New: MMA built-in dies with incorrect sharing of tree nodes error bergner at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-09-01 18:54 ` bergner at gcc dot gnu.org
@ 2020-09-03 15:10 ` cvs-commit at gcc dot gnu.org
  2020-09-03 15:26 ` bergner at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-09-03 15:10 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96808

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Peter Bergner
<bergner@gcc.gnu.org>:

https://gcc.gnu.org/g:abd9341c2f1ae5f7aa73950cdaac58ef3a2f0190

commit r10-8706-gabd9341c2f1ae5f7aa73950cdaac58ef3a2f0190
Author: Peter Bergner <bergner@linux.ibm.com>
Date:   Tue Sep 1 13:47:44 2020 -0500

    rs6000: MMA built-in dies with incorrect sharing of tree nodes error

    When we expand our MMA built-ins into gimple, we erroneously reused the
    accumulator memory reference for both the source input value as well as
    the destination output value.  This led to a tree sharing error.
    The solution is to create separate memory references for the input
    and output values.

    2020-09-01  Peter Bergner  <bergner@linux.ibm.com>

    gcc/
            PR target/96808
            * config/rs6000/rs6000-call.c (rs6000_gimple_fold_mma_builtin): Do
not
            reuse accumulator memory reference for source and destination
accesses.

    gcc/testsuite/
            PR target/96808
            * gcc.target/powerpc/pr96808.c: New test.

    (cherry picked from commit 8bc0f24d7a20d89383859907b875a26ce59dc6c8)

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

* [Bug target/96808] MMA built-in dies with incorrect sharing of tree nodes error
  2020-08-26 21:30 [Bug target/96808] New: MMA built-in dies with incorrect sharing of tree nodes error bergner at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-09-03 15:10 ` cvs-commit at gcc dot gnu.org
@ 2020-09-03 15:26 ` bergner at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: bergner at gcc dot gnu.org @ 2020-09-03 15:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96808

Peter Bergner <bergner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Peter Bergner <bergner at gcc dot gnu.org> ---
Pushed to GCC 10, so fixed everywhere.

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

end of thread, other threads:[~2020-09-03 15:26 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-26 21:30 [Bug target/96808] New: MMA built-in dies with incorrect sharing of tree nodes error bergner at gcc dot gnu.org
2020-08-26 21:31 ` [Bug target/96808] " bergner at gcc dot gnu.org
2020-09-01 18:50 ` cvs-commit at gcc dot gnu.org
2020-09-01 18:53 ` bergner at gcc dot gnu.org
2020-09-01 18:54 ` bergner at gcc dot gnu.org
2020-09-03 15:10 ` cvs-commit at gcc dot gnu.org
2020-09-03 15:26 ` 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).