public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/98872] New: ICE leads to SEGV on MMA test case
@ 2021-01-28 22:49 bergner at gcc dot gnu.org
  2021-01-28 22:51 ` [Bug target/98872] " bergner at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: bergner at gcc dot gnu.org @ 2021-01-28 22:49 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98872
           Summary: ICE leads to SEGV on MMA test case
           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:~/gcc/BUGS/MMA$ cat ice3.i 
typedef unsigned char vec_t __attribute__((vector_size(16)));
int
foo (vec_t *rowA, vec_t *rowB, vec_t *dst)
{
  __vector_quad acc0;
  __builtin_mma_xvf32gerpp (&acc0, rowB[0], rowA[0]);
  __builtin_mma_disassemble_acc (dst, &acc0);
}

bergner@pike:~/gcc/BUGS/MMA$
/home/bergner/gcc/build/gcc-fsf-mainline-mma-builtins-debug/gcc/xgcc
-B/home/bergner/gcc/build/gcc-fsf-mainline-mma-builtins-debug/gcc -S -O2
-mcpu=power10 ice3.i 
during RTL pass: init-regs
ice3.i: In function ‘foo’:
ice3.i:8:1: internal compiler error: Segmentation fault
    8 | }
      | ^
0x113d6697 crash_signal
        /home/bergner/gcc/gcc-fsf-mainline-mma-builtins/gcc/toplev.c:327
0x10b436c4 emit_move_insn(rtx_def*, rtx_def*)
        /home/bergner/gcc/gcc-fsf-mainline-mma-builtins/gcc/expr.c:3821
0x1289319b initialize_uninitialized_regs
        /home/bergner/gcc/gcc-fsf-mainline-mma-builtins/gcc/init-regs.c:108
0x12893443 execute
        /home/bergner/gcc/gcc-fsf-mainline-mma-builtins/gcc/init-regs.c:156

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

* [Bug target/98872] ICE leads to SEGV on MMA test case
  2021-01-28 22:49 [Bug target/98872] New: ICE leads to SEGV on MMA test case bergner at gcc dot gnu.org
@ 2021-01-28 22:51 ` bergner at gcc dot gnu.org
  2021-01-29  7:48 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: bergner at gcc dot gnu.org @ 2021-01-28 22:51 UTC (permalink / raw)
  To: gcc-bugs

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

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
             Status|UNCONFIRMED                 |ASSIGNED
                 CC|                            |raji at linux dot vnet.ibm.com,
                   |                            |segher at gcc dot gnu.org,
                   |                            |wschmidt at gcc dot gnu.org
             Target|                            |powerpc*-*-*
   Target Milestone|---                         |11.0
   Last reconfirmed|                            |2021-01-28
     Ever confirmed|0                           |1

--- Comment #1 from Peter Bergner <bergner at gcc dot gnu.org> ---
Raji reported the above ICE/SEGV.  This probably also affects GCC10.

Mine.

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

* [Bug target/98872] ICE leads to SEGV on MMA test case
  2021-01-28 22:49 [Bug target/98872] New: ICE leads to SEGV on MMA test case bergner at gcc dot gnu.org
  2021-01-28 22:51 ` [Bug target/98872] " bergner at gcc dot gnu.org
@ 2021-01-29  7:48 ` rguenth at gcc dot gnu.org
  2021-02-04  0:05 ` bergner at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-01-29  7:48 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

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

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

* [Bug target/98872] ICE leads to SEGV on MMA test case
  2021-01-28 22:49 [Bug target/98872] New: ICE leads to SEGV on MMA test case bergner at gcc dot gnu.org
  2021-01-28 22:51 ` [Bug target/98872] " bergner at gcc dot gnu.org
  2021-01-29  7:48 ` rguenth at gcc dot gnu.org
@ 2021-02-04  0:05 ` bergner at gcc dot gnu.org
  2021-02-15 16:39 ` cvs-commit at gcc dot gnu.org
  2021-02-15 17:38 ` bergner at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: bergner at gcc dot gnu.org @ 2021-02-04  0:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Peter Bergner <bergner at gcc dot gnu.org> ---
The problem is caused by using an uninitialized __vector_quad (or
__vector_pair) variable.  In those cases, initialize_uninitialized_regs()
detects that and emits an initialization via:

  emit_move_insn (reg, CONST0_RTX (GET_MODE (reg)));

The problem is we don't have CONST0_RTX(mode) defined for opaque modes, so it
returns NULL which leads to the ICE.  I have a patch I'm testing to add that
support.

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

* [Bug target/98872] ICE leads to SEGV on MMA test case
  2021-01-28 22:49 [Bug target/98872] New: ICE leads to SEGV on MMA test case bergner at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-02-04  0:05 ` bergner at gcc dot gnu.org
@ 2021-02-15 16:39 ` cvs-commit at gcc dot gnu.org
  2021-02-15 17:38 ` bergner at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-02-15 16:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 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:a33927c9ab4af3f4595251ce0c8ba54db821b039

commit r11-7249-ga33927c9ab4af3f4595251ce0c8ba54db821b039
Author: Peter Bergner <bergner@linux.ibm.com>
Date:   Mon Feb 15 10:38:33 2021 -0600

    rtl-optimization: Fix uninitialized use of opaque mode variable ICE
[PR98872]

    The initialize_uninitialized_regs function emits (set (reg:) (CONST0_RTX))
    for all uninitialized pseudo uses.  However, some modes (eg, opaque modes)
    may not have a CONST0_RTX defined, leading to an ICE when we try and create
    the initialization insn.  The fix is to skip emitting the initialization
    if there is no CONST0_RTX defined for the mode.

    2021-02-15  Peter Bergner  <bergner@linux.ibm.com>

    gcc/
            PR rtl-optimization/98872
            * init-regs.c (initialize_uninitialized_regs): Skip initialization
            if CONST0_RTX is NULL.

    gcc/testsuite/
            PR rtl-optimization/98872
            * gcc.target/powerpc/pr98872.c: New test.

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

* [Bug target/98872] ICE leads to SEGV on MMA test case
  2021-01-28 22:49 [Bug target/98872] New: ICE leads to SEGV on MMA test case bergner at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-02-15 16:39 ` cvs-commit at gcc dot gnu.org
@ 2021-02-15 17:38 ` bergner at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: bergner at gcc dot gnu.org @ 2021-02-15 17:38 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
   Target Milestone|---                         |11.0
         Resolution|---                         |FIXED

--- Comment #4 from Peter Bergner <bergner at gcc dot gnu.org> ---
Fixed.  No backport needed.

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

end of thread, other threads:[~2021-02-15 17:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28 22:49 [Bug target/98872] New: ICE leads to SEGV on MMA test case bergner at gcc dot gnu.org
2021-01-28 22:51 ` [Bug target/98872] " bergner at gcc dot gnu.org
2021-01-29  7:48 ` rguenth at gcc dot gnu.org
2021-02-04  0:05 ` bergner at gcc dot gnu.org
2021-02-15 16:39 ` cvs-commit at gcc dot gnu.org
2021-02-15 17:38 ` 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).