public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/113229] New: [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2
@ 2024-01-04  8:20 pinskia at gcc dot gnu.org
  2024-01-04  8:21 ` [Bug target/113229] " pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-04  8:20 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113229
           Summary: [14 Regression] gcc.dg/torture/pr70083.c ICEs when
                    compiled with -march=armv9-a+sve2
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, testsuite-fail
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64-linux-gnu

```
spawn -ignore SIGHUP
/bajas/pinskia/src/upstream-full-cross/gcc/objdir-stage2/gcc/xgcc
-B/bajas/pinskia/src/upstream-full-cross/gcc/objdir-stage2/gcc/
/home/apinski/src/upstream-full-cross/gcc/gcc/testsuite/gcc.dg/torture/pr70083.c
-march=armv9-a+sve2 -fdiagnostics-plain-output -O1 -Wno-psabi -S -o pr70083.s
during RTL pass: expand
/home/apinski/src/upstream-full-cross/gcc/gcc/testsuite/gcc.dg/torture/pr70083.c:
In function 'foo':
/home/apinski/src/upstream-full-cross/gcc/gcc/testsuite/gcc.dg/torture/pr70083.c:20:64:
internal compiler error: in paradoxical_subreg_p, at rtl.h:3213
0x80c65b paradoxical_subreg_p(machine_mode, machine_mode)
        ../../gcc/rtl.h:3213
0x80cfc8 paradoxical_subreg_p(machine_mode, machine_mode)
        ../../gcc/poly-int.h:2179
0x80cfc8 simplify_const_vector_subreg
        ../../gcc/simplify-rtx.cc:7423
0x80cfc8 simplify_context::simplify_subreg(machine_mode, rtx_def*,
machine_mode, poly_int<2u, unsigned long>)
        ../../gcc/simplify-rtx.cc:7595
0x1029011 simplify_context::simplify_gen_subreg(machine_mode, rtx_def*,
machine_mode, poly_int<2u, unsigned long>)
        ../../gcc/simplify-rtx.cc:7875
0x19af255 simplify_gen_subreg(machine_mode, rtx_def*, machine_mode,
poly_int<2u, unsigned long>)
        ../../gcc/rtl.h:3552
0x19af255 gen_divv4si3(rtx_def*, rtx_def*, rtx_def*)
        ../../gcc/config/aarch64/aarch64-simd.md:2715
```

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

* [Bug target/113229] [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2
  2024-01-04  8:20 [Bug target/113229] New: [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2 pinskia at gcc dot gnu.org
@ 2024-01-04  8:21 ` pinskia at gcc dot gnu.org
  2024-01-04  8:25 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-04  8:21 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
last known to work: LAST_UPDATED: Tue Dec 12 23:15:47 UTC 2023
tested date: LAST_UPDATED: Thu Jan  4 01:23:51 UTC 2024

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

* [Bug target/113229] [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2
  2024-01-04  8:20 [Bug target/113229] New: [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2 pinskia at gcc dot gnu.org
  2024-01-04  8:21 ` [Bug target/113229] " pinskia at gcc dot gnu.org
@ 2024-01-04  8:25 ` pinskia at gcc dot gnu.org
  2024-01-04  8:37 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-04  8:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
gcc.target/aarch64/pr70120-1.c ICEs in a similar way too.

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

* [Bug target/113229] [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2
  2024-01-04  8:20 [Bug target/113229] New: [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2 pinskia at gcc dot gnu.org
  2024-01-04  8:21 ` [Bug target/113229] " pinskia at gcc dot gnu.org
  2024-01-04  8:25 ` pinskia at gcc dot gnu.org
@ 2024-01-04  8:37 ` pinskia at gcc dot gnu.org
  2024-01-05 17:21 ` avieira at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-04  8:37 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |avieira at gcc dot gnu.org
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=112787

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I suspect this was exposed/caused by r14-6752-ga3ff76278efe00 (aka PR 112787)

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

* [Bug target/113229] [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2
  2024-01-04  8:20 [Bug target/113229] New: [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2 pinskia at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-01-04  8:37 ` pinskia at gcc dot gnu.org
@ 2024-01-05 17:21 ` avieira at gcc dot gnu.org
  2024-01-05 17:23 ` avieira at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: avieira at gcc dot gnu.org @ 2024-01-05 17:21 UTC (permalink / raw)
  To: gcc-bugs

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

avieira at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-01-05
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #4 from avieira at gcc dot gnu.org ---
So I can confirm this ICE and it was exposed rather than caused by my patch.

The problem arises because it seems we have never tried to simplify a:
(subreg:<poly-sized mode> (subreg:<...> (<non-poly-sized-mode>) N) M)

This makes simplify_subreg neter the if (GET_CODE (op) == SUBREG) which calls:
'paradoxical_subreg_p (VNx4SImode, OImode)'
Which seems to assume these are ordered with an assert.

I am not sure what the right fix is here, I did check and changing
paradoxical_subreg_p to return false if the mode sizes are not ordered leads to
some bizarre fail, it looks like simplify_gen_subreg then just returns 0 ...
rather than the original nested subregs.

Before I dig deeper I'll get richi and Richard S to comment.

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

* [Bug target/113229] [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2
  2024-01-04  8:20 [Bug target/113229] New: [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2 pinskia at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-01-05 17:21 ` avieira at gcc dot gnu.org
@ 2024-01-05 17:23 ` avieira at gcc dot gnu.org
  2024-01-05 17:23 ` avieira at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: avieira at gcc dot gnu.org @ 2024-01-05 17:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from avieira at gcc dot gnu.org ---
Oh forgot to mention, this is triggering because of the div optimization in:
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=c69db3ef7f7d82a50f46038aa5457b7c8cc2d643

But I suspect that too is just an enabler and not the root cause? Unless we
aren't supposed to use subregs for sve modes...

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

* [Bug target/113229] [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2
  2024-01-04  8:20 [Bug target/113229] New: [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2 pinskia at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-01-05 17:23 ` avieira at gcc dot gnu.org
@ 2024-01-05 17:23 ` avieira at gcc dot gnu.org
  2024-01-05 22:23 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: avieira at gcc dot gnu.org @ 2024-01-05 17:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from avieira at gcc dot gnu.org ---
Oh forgot to mention, this is triggering because of the div optimization in:
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=c69db3ef7f7d82a50f46038aa5457b7c8cc2d643

But I suspect that too is just an enabler and not the root cause? Unless we
aren't supposed to use subregs for sve modes...

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

* [Bug target/113229] [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2
  2024-01-04  8:20 [Bug target/113229] New: [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2 pinskia at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-01-05 17:23 ` avieira at gcc dot gnu.org
@ 2024-01-05 22:23 ` pinskia at gcc dot gnu.org
  2024-01-08 14:47 ` rguenth at gcc dot gnu.org
  2024-01-10  8:01 ` pinskia at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-05 22:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to avieira from comment #6)
> Oh forgot to mention, this is triggering because of the div optimization in:
> https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;
> h=c69db3ef7f7d82a50f46038aa5457b7c8cc2d643
> 
> But I suspect that too is just an enabler and not the root cause? Unless we
> aren't supposed to use subregs for sve modes...

Note there is another paths which lead to crashing in paradoxical_subreg_p
still via simplify_const_vector_subreg (but not with the gen_divv4si3 in the
trace) in a different testcase; testsuite/gcc.dg/pr69896.c .



```
/home/apinski/src/upstream-full-cross/gcc/gcc/testsuite/gcc.dg/pr69896.c:22:1:
internal compiler error: in paradoxical_subreg_p, at rtl.h:3213
0x80c65b paradoxical_subreg_p(machine_mode, machine_mode)
        ../../gcc/rtl.h:3213
0x80cfc8 paradoxical_subreg_p(machine_mode, machine_mode)
        ../../gcc/poly-int.h:2179
0x80cfc8 simplify_const_vector_subreg
        ../../gcc/simplify-rtx.cc:7423
0x80cfc8 simplify_context::simplify_subreg(machine_mode, rtx_def*,
machine_mode, poly_int<2u, unsigned long>)
        ../../gcc/simplify-rtx.cc:7595
0xfae1c9 insn_propagation::apply_to_rvalue_1(rtx_def**)
        ../../gcc/recog.cc:1176
0xfadcab insn_propagation::apply_to_rvalue_1(rtx_def**)
        ../../gcc/recog.cc:1117
0xfade93 insn_propagation::apply_to_rvalue_1(rtx_def**)
        ../../gcc/recog.cc:1254
0xfae63f insn_propagation::apply_to_pattern(rtx_def**)
        ../../gcc/recog.cc:1396
0x1cfdb66 try_fwprop_subst_pattern
        ../../gcc/fwprop.cc:440
0x1cfdb66 try_fwprop_subst
        ../../gcc/fwprop.cc:613
0x1cfe500 forward_propagate_and_simplify
        ../../gcc/fwprop.cc:809
0x1cfe500 forward_propagate_into
        ../../gcc/fwprop.cc:872
0x1cfe89d forward_propagate_into
        ../../gcc/fwprop.cc:821
0x1cfe89d fwprop_insn
        ../../gcc/fwprop.cc:929
0x1cfe9c1 fwprop
        ../../gcc/fwprop.cc:981
```

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

* [Bug target/113229] [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2
  2024-01-04  8:20 [Bug target/113229] New: [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2 pinskia at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2024-01-05 22:23 ` pinskia at gcc dot gnu.org
@ 2024-01-08 14:47 ` rguenth at gcc dot gnu.org
  2024-01-10  8:01 ` pinskia at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-08 14:47 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

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

* [Bug target/113229] [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2
  2024-01-04  8:20 [Bug target/113229] New: [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2 pinskia at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2024-01-08 14:47 ` rguenth at gcc dot gnu.org
@ 2024-01-10  8:01 ` pinskia at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-10  8:01 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Oh this is a dup of bug 109636. In that r14-6752-ga3ff76278efe00 exposed the
same issue.

*** This bug has been marked as a duplicate of bug 109636 ***

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

end of thread, other threads:[~2024-01-10  8:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-04  8:20 [Bug target/113229] New: [14 Regression] gcc.dg/torture/pr70083.c ICEs when compiled with -march=armv9-a+sve2 pinskia at gcc dot gnu.org
2024-01-04  8:21 ` [Bug target/113229] " pinskia at gcc dot gnu.org
2024-01-04  8:25 ` pinskia at gcc dot gnu.org
2024-01-04  8:37 ` pinskia at gcc dot gnu.org
2024-01-05 17:21 ` avieira at gcc dot gnu.org
2024-01-05 17:23 ` avieira at gcc dot gnu.org
2024-01-05 17:23 ` avieira at gcc dot gnu.org
2024-01-05 22:23 ` pinskia at gcc dot gnu.org
2024-01-08 14:47 ` rguenth at gcc dot gnu.org
2024-01-10  8:01 ` pinskia 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).