public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/99249] New: SVE: ICE in aarch64_expand_sve_const_vector (during RTL pass: early_remat)
@ 2021-02-24 11:45 acoplan at gcc dot gnu.org
  2021-02-24 12:00 ` [Bug target/99249] " ktkachov at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-02-24 11:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99249
           Summary: SVE: ICE in aarch64_expand_sve_const_vector (during
                    RTL pass: early_remat)
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

The following fails:

$ cat test.cc
#include <arm_sve.h>
extern char b[];
int x;
void f() {
  while (x) {
    x = svaddv(
        svnot_z(svnot_z(svptrue_pat_b8(SV_VL6),
                        svmov_z(svptrue_pat_b8(SV_VL1),
                                svptrue_pat_b16(SV_VL3))),
                svptrue_pat_b64(SV_VL2)),
        svdup_s32(8193));
    for (int j = x; j; j++)
      b[j] = 0;
  }
}
$ aarch64-linux-gnu-gcc -c -march=armv8.2-a+sve -Os test.cc
during RTL pass: early_remat
test.cc: In function ‘void f()’:
test.cc:15:1: internal compiler error: in aarch64_expand_sve_const_vector, at
config/aarch64/aarch64.c:4956
   15 | }
      | ^
0x14ffb66 aarch64_expand_sve_const_vector
        /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64.c:4956
0x15019b1 aarch64_expand_mov_immediate(rtx_def*, rtx_def*)
        /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64.c:5395
0x19afb10 gen_movvnx16qi(rtx_def*, rtx_def*)
        /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64-sve.md:662
0xcab8e6 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*,
rtx_def*) const
        /home/alecop01/toolchain/src/gcc/gcc/recog.h:407
0xcab8e6 emit_move_insn_1(rtx_def*, rtx_def*)
        /home/alecop01/toolchain/src/gcc/gcc/expr.c:3766
0xcabe37 emit_move_insn(rtx_def*, rtx_def*)
        /home/alecop01/toolchain/src/gcc/gcc/expr.c:3936
0xc7e694 force_reg(machine_mode, rtx_def*)
        /home/alecop01/toolchain/src/gcc/gcc/explow.c:677
0x14ffc4f aarch64_expand_sve_const_vector
        /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64.c:4964
0x15019b1 aarch64_expand_mov_immediate(rtx_def*, rtx_def*)
        /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64.c:5395
0x19afb10 gen_movvnx16qi(rtx_def*, rtx_def*)
        /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64-sve.md:662
0xcab8e6 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*,
rtx_def*) const
        /home/alecop01/toolchain/src/gcc/gcc/recog.h:407
0xcab8e6 emit_move_insn_1(rtx_def*, rtx_def*)
        /home/alecop01/toolchain/src/gcc/gcc/expr.c:3766
0xcabe37 emit_move_insn(rtx_def*, rtx_def*)
        /home/alecop01/toolchain/src/gcc/gcc/expr.c:3936
0xc7e614 copy_to_mode_reg(machine_mode, rtx_def*)
        /home/alecop01/toolchain/src/gcc/gcc/explow.c:653
0xf69b69 maybe_legitimize_operand
        /home/alecop01/toolchain/src/gcc/gcc/optabs.c:7626
0xf69b69 maybe_legitimize_operands(insn_code, unsigned int, unsigned int,
expand_operand*)
        /home/alecop01/toolchain/src/gcc/gcc/optabs.c:7758
0xf69e52 maybe_gen_insn(insn_code, unsigned int, expand_operand*)
        /home/alecop01/toolchain/src/gcc/gcc/optabs.c:7777
0xf6a06e maybe_expand_insn(insn_code, unsigned int, expand_operand*)
        /home/alecop01/toolchain/src/gcc/gcc/optabs.c:7820
0xf69605 expand_insn(insn_code, unsigned int, expand_operand*)
        /home/alecop01/toolchain/src/gcc/gcc/optabs.c:7851
0x14d45d2 aarch64_sve_emit_int_cmp
        /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64.c:3920
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.

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

* [Bug target/99249] SVE: ICE in aarch64_expand_sve_const_vector (during RTL pass: early_remat)
  2021-02-24 11:45 [Bug target/99249] New: SVE: ICE in aarch64_expand_sve_const_vector (during RTL pass: early_remat) acoplan at gcc dot gnu.org
@ 2021-02-24 12:00 ` ktkachov at gcc dot gnu.org
  2021-04-08 12:02 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2021-02-24 12:00 UTC (permalink / raw)
  To: gcc-bugs

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

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |10.2.1
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
                 CC|                            |ktkachov at gcc dot gnu.org
   Target Milestone|---                         |10.3
   Last reconfirmed|                            |2021-02-24

--- Comment #1 from ktkachov at gcc dot gnu.org ---
Confirmed on the 10 branch as well.

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

* [Bug target/99249] SVE: ICE in aarch64_expand_sve_const_vector (during RTL pass: early_remat)
  2021-02-24 11:45 [Bug target/99249] New: SVE: ICE in aarch64_expand_sve_const_vector (during RTL pass: early_remat) acoplan at gcc dot gnu.org
  2021-02-24 12:00 ` [Bug target/99249] " ktkachov at gcc dot gnu.org
@ 2021-04-08 12:02 ` rguenth at gcc dot gnu.org
  2021-04-13 18:07 ` rsandifo at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-04-08 12:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10.3 is being released, retargeting bugs to GCC 10.4.

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

* [Bug target/99249] SVE: ICE in aarch64_expand_sve_const_vector (during RTL pass: early_remat)
  2021-02-24 11:45 [Bug target/99249] New: SVE: ICE in aarch64_expand_sve_const_vector (during RTL pass: early_remat) acoplan at gcc dot gnu.org
  2021-02-24 12:00 ` [Bug target/99249] " ktkachov at gcc dot gnu.org
  2021-04-08 12:02 ` rguenth at gcc dot gnu.org
@ 2021-04-13 18:07 ` rsandifo at gcc dot gnu.org
  2021-04-15 11:01 ` rsandifo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2021-04-13 18:07 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rsandifo at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #3 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Mine.

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

* [Bug target/99249] SVE: ICE in aarch64_expand_sve_const_vector (during RTL pass: early_remat)
  2021-02-24 11:45 [Bug target/99249] New: SVE: ICE in aarch64_expand_sve_const_vector (during RTL pass: early_remat) acoplan at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-04-13 18:07 ` rsandifo at gcc dot gnu.org
@ 2021-04-15 11:01 ` rsandifo at gcc dot gnu.org
  2021-04-23  9:10 ` [Bug target/99249] [8/9/10 Backport] " cvs-commit at gcc dot gnu.org
  2021-04-23 16:32 ` [Bug target/99249] " rsandifo at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2021-04-15 11:01 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rsandifo at gcc dot gnu.org

--- Comment #4 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Fixed by
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=a065e0bb092a010664777394530ab1a52bb5293b,
but I typoed the PR number.

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

* [Bug target/99249] [8/9/10 Backport] SVE: ICE in aarch64_expand_sve_const_vector (during RTL pass: early_remat)
  2021-02-24 11:45 [Bug target/99249] New: SVE: ICE in aarch64_expand_sve_const_vector (during RTL pass: early_remat) acoplan at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-04-15 11:01 ` rsandifo at gcc dot gnu.org
@ 2021-04-23  9:10 ` cvs-commit at gcc dot gnu.org
  2021-04-23 16:32 ` [Bug target/99249] " rsandifo at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-23  9:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Richard Sandiford
<rsandifo@gcc.gnu.org>:

https://gcc.gnu.org/g:690aa217cf2882e58a0572171a3dd8e346f616cf

commit r10-9754-g690aa217cf2882e58a0572171a3dd8e346f616cf
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Fri Apr 23 10:09:42 2021 +0100

    aarch64: Handle more SVE vector constants [PR99246]

    PR99246 is about a case in which we failed to handle a CONST_VECTOR
    with NELTS_PER_PATTERN==2, i.e. a vector with a âforegroundâ sequence
    of N vectors followed by a repeating âbackgroundâ sequence of N
vectors.

    At the moment, it's difficult to produce these vectors directly,
    but I'm hoping that for GCC 12 we'll do more folding, which will
    in turn make this easier to test and easier to optimise.  Until then,
    the patch simply relies on the testcase in the PR.

    gcc/
            PR target/99249
            * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector_sel):
            New function.
            (aarch64_expand_sve_const_vector): Use it for nelts_per_pattern==2.

    gcc/testsuite/
            PR target/99249
            * gcc.target/aarch64/sve/acle/general/pr99246.c: New test.

    (cherry picked from commit a065e0bb092a010664777394530ab1a52bb5293b)

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

* [Bug target/99249] SVE: ICE in aarch64_expand_sve_const_vector (during RTL pass: early_remat)
  2021-02-24 11:45 [Bug target/99249] New: SVE: ICE in aarch64_expand_sve_const_vector (during RTL pass: early_remat) acoplan at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-04-23  9:10 ` [Bug target/99249] [8/9/10 Backport] " cvs-commit at gcc dot gnu.org
@ 2021-04-23 16:32 ` rsandifo at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2021-04-23 16:32 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
            Summary|[8/9 Backport] SVE: ICE in  |SVE: ICE in
                   |aarch64_expand_sve_const_ve |aarch64_expand_sve_const_ve
                   |ctor (during RTL pass:      |ctor (during RTL pass:
                   |early_remat)                |early_remat)

--- Comment #6 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
I was going to backport this further than GCC 10, but it turns
out that the code changed too much in the GCC 9->GCC 10 timeframe
for it to apply cleanly.  I'm also not aware of any way of triggering
the bug before GCC 10.

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

end of thread, other threads:[~2021-04-23 16:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-24 11:45 [Bug target/99249] New: SVE: ICE in aarch64_expand_sve_const_vector (during RTL pass: early_remat) acoplan at gcc dot gnu.org
2021-02-24 12:00 ` [Bug target/99249] " ktkachov at gcc dot gnu.org
2021-04-08 12:02 ` rguenth at gcc dot gnu.org
2021-04-13 18:07 ` rsandifo at gcc dot gnu.org
2021-04-15 11:01 ` rsandifo at gcc dot gnu.org
2021-04-23  9:10 ` [Bug target/99249] [8/9/10 Backport] " cvs-commit at gcc dot gnu.org
2021-04-23 16:32 ` [Bug target/99249] " rsandifo 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).