public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/104923] New: MMA __builtin_mma_disassemble_acc test case ICEs in LRA
@ 2022-03-14 22:19 bergner at gcc dot gnu.org
  2022-03-14 22:33 ` [Bug target/104923] " bergner at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: bergner at gcc dot gnu.org @ 2022-03-14 22:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104923
           Summary: MMA __builtin_mma_disassemble_acc test case ICEs in
                    LRA
           Product: gcc
           Version: 12.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: ---

The following two test cases both ICE in LRA with current trunk and GCC11.  It
compiles finw with GCC 10:

bergner@rain6p1:~$ cat ice1.c 
void
foo (__vector_quad *acc, __vector char *dst, unsigned int n)
{
  __vector char a[4];
  __builtin_mma_disassemble_acc(a, acc);
  dst[2 * n] = a[0];
}
bergner@rain6p1:~$ gcc -S -O2 -mcpu=power10 ice1.c 
during RTL pass: reload
ice1.c: In function ‘foo’:
ice1.c:7:1: internal compiler error: in lra_set_insn_recog_data, at lra.cc:1010
    7 | }
      | ^
0x109a49fb lra_set_insn_recog_data(rtx_insn*)
        /home/bergner/gcc/gcc-fsf-mainline-base/gcc/lra.cc:1010
...



bergner@rain6p1:~$ cat ice2.c 
void
foo (__vector_quad *acc, __vector char *dst, unsigned int n)
{
  __vector char a[4];
  __builtin_mma_disassemble_acc(a, acc);
  dst[3 * n] = a[0];
}
bergner@rain6p1:~$ gcc -S -O2 -mcpu=power10 ice2.c 
during RTL pass: reload
ice2.c: In function ‘foo’:
ice2.c:7:1: internal compiler error: in decompose_normal_address, at
rtlanal.cc:6716
    7 | }
      | ^
0x10be4b23 decompose_normal_address
        /home/bergner/gcc/gcc-fsf-mainline-base/gcc/rtlanal.cc:6716
...

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

* [Bug target/104923] MMA __builtin_mma_disassemble_acc test case ICEs in LRA
  2022-03-14 22:19 [Bug target/104923] New: MMA __builtin_mma_disassemble_acc test case ICEs in LRA bergner at gcc dot gnu.org
@ 2022-03-14 22:33 ` bergner at gcc dot gnu.org
  2022-03-14 22:34 ` bergner at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bergner at gcc dot gnu.org @ 2022-03-14 22:33 UTC (permalink / raw)
  To: gcc-bugs

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

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
      Known to fail|                            |11.0, 12.0
      Known to work|                            |10.0
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-03-14

--- Comment #1 from Peter Bergner <bergner at gcc dot gnu.org> ---
We ICE due to having illegal addresses in the MEM passed to the
__builtin_mma_disassemble_acc builtin:

(insn 18 17 0 2 (set (mem:V16QI (plus:DI (and:DI (mult:DI (reg:DI 137)
                        (const_int 32 [0x20]))
                    (const_int 68719476704 [0xfffffffe0]))
                (reg:DI 136)) [0 *_4+0 S16 A128])
        (unspec:V16QI [
                (reg:XO 134 [ *acc_6(D) ])
                (const_int 3 [0x3])
            ] UNSPEC_MMA_EXTRACT)) "ice1.c":6:14 2153 {*mma_disassemble_acc}
     (expr_list:REG_DEAD (reg:DI 137)
        (expr_list:REG_DEAD (reg:DI 136)
            (expr_list:REG_DEAD (reg:XO 134 [ *acc_6(D) ])
                (nil)))))

The problem here is that the mma_disassemble_output_operand predicate is too
lenient on the types of addresses it will accept.  I have a patch which
restricts the addresses accepted which fixes the ICE.  I'm currently regression
testing the patch.

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

* [Bug target/104923] MMA __builtin_mma_disassemble_acc test case ICEs in LRA
  2022-03-14 22:19 [Bug target/104923] New: MMA __builtin_mma_disassemble_acc test case ICEs in LRA bergner at gcc dot gnu.org
  2022-03-14 22:33 ` [Bug target/104923] " bergner at gcc dot gnu.org
@ 2022-03-14 22:34 ` bergner at gcc dot gnu.org
  2022-03-15  7:55 ` [Bug target/104923] [11/12 Regression] " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: bergner at gcc dot gnu.org @ 2022-03-14 22:34 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0
                 CC|                            |dje at gcc dot gnu.org,
                   |                            |segher at gcc dot gnu.org

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

* [Bug target/104923] [11/12 Regression] MMA __builtin_mma_disassemble_acc test case ICEs in LRA
  2022-03-14 22:19 [Bug target/104923] New: MMA __builtin_mma_disassemble_acc test case ICEs in LRA bergner at gcc dot gnu.org
  2022-03-14 22:33 ` [Bug target/104923] " bergner at gcc dot gnu.org
  2022-03-14 22:34 ` bergner at gcc dot gnu.org
@ 2022-03-15  7:55 ` rguenth at gcc dot gnu.org
  2022-03-15 13:50 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-03-15  7:55 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|12.0                        |11.3
           Priority|P3                          |P2
            Summary|MMA                         |[11/12 Regression] MMA
                   |__builtin_mma_disassemble_a |__builtin_mma_disassemble_a
                   |cc test case ICEs in LRA    |cc test case ICEs in LRA

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

* [Bug target/104923] [11/12 Regression] MMA __builtin_mma_disassemble_acc test case ICEs in LRA
  2022-03-14 22:19 [Bug target/104923] New: MMA __builtin_mma_disassemble_acc test case ICEs in LRA bergner at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-03-15  7:55 ` [Bug target/104923] [11/12 Regression] " rguenth at gcc dot gnu.org
@ 2022-03-15 13:50 ` cvs-commit at gcc dot gnu.org
  2022-03-18 21:03 ` cvs-commit at gcc dot gnu.org
  2022-03-18 21:07 ` bergner at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-15 13:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 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:b5baf569f77e1f172061642d4d8593e1ea737add

commit r12-7657-gb5baf569f77e1f172061642d4d8593e1ea737add
Author: Peter Bergner <bergner@linux.ibm.com>
Date:   Tue Mar 15 08:46:47 2022 -0500

    rs6000: Fix invalid address passed to __builtin_mma_disassemble_acc
[PR104923]

    The mma_disassemble_output_operand predicate is too lenient on the types
    of addresses it will accept, leading to combine creating invalid address
    that eventually lead to ICEs in LRA.  The solution is to restrict the
    addresses to indirect, indexed or those valid for quad memory accesses.

    2022-03-15  Peter Bergner  <bergner@linux.ibm.com>

    gcc/
            PR target/104923
            * config/rs6000/predicates.md (mma_disassemble_output_operand):
Restrict
            acceptable MEM addresses.

    gcc/testsuite/
            PR target/104923
            * gcc.target/powerpc/pr104923.c: New test.

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

* [Bug target/104923] [11/12 Regression] MMA __builtin_mma_disassemble_acc test case ICEs in LRA
  2022-03-14 22:19 [Bug target/104923] New: MMA __builtin_mma_disassemble_acc test case ICEs in LRA bergner at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-03-15 13:50 ` cvs-commit at gcc dot gnu.org
@ 2022-03-18 21:03 ` cvs-commit at gcc dot gnu.org
  2022-03-18 21:07 ` bergner at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-03-18 21:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:114451a67febf2361b8ffa3f1ba6f33790791c09

commit r11-9669-g114451a67febf2361b8ffa3f1ba6f33790791c09
Author: Peter Bergner <bergner@linux.ibm.com>
Date:   Tue Mar 15 08:46:47 2022 -0500

    rs6000: Fix invalid address passed to __builtin_mma_disassemble_acc
[PR104923]

    The mma_disassemble_output_operand predicate is too lenient on the types
    of addresses it will accept, leading to combine creating invalid address
    that eventually lead to ICEs in LRA.  The solution is to restrict the
    addresses to indirect, indexed or those valid for quad memory accesses.

    2022-03-15  Peter Bergner  <bergner@linux.ibm.com>

    gcc/
            PR target/104923
            * config/rs6000/predicates.md (mma_disassemble_output_operand):
Restrict
            acceptable MEM addresses.

    gcc/testsuite/
            PR target/104923
            * gcc.target/powerpc/pr104923.c: New test.

    (cherry picked from commit b5baf569f77e1f172061642d4d8593e1ea737add)

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

* [Bug target/104923] [11/12 Regression] MMA __builtin_mma_disassemble_acc test case ICEs in LRA
  2022-03-14 22:19 [Bug target/104923] New: MMA __builtin_mma_disassemble_acc test case ICEs in LRA bergner at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-03-18 21:03 ` cvs-commit at gcc dot gnu.org
@ 2022-03-18 21:07 ` bergner at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: bergner at gcc dot gnu.org @ 2022-03-18 21:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2022-03-18 21:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-14 22:19 [Bug target/104923] New: MMA __builtin_mma_disassemble_acc test case ICEs in LRA bergner at gcc dot gnu.org
2022-03-14 22:33 ` [Bug target/104923] " bergner at gcc dot gnu.org
2022-03-14 22:34 ` bergner at gcc dot gnu.org
2022-03-15  7:55 ` [Bug target/104923] [11/12 Regression] " rguenth at gcc dot gnu.org
2022-03-15 13:50 ` cvs-commit at gcc dot gnu.org
2022-03-18 21:03 ` cvs-commit at gcc dot gnu.org
2022-03-18 21:07 ` 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).