public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/111486] New: [14 Regression] ICE: in require, at machmode.h:313 with -O2 -march=rv64iv
@ 2023-09-19 18:52 zsojka at seznam dot cz
  2023-09-20  6:01 ` [Bug target/111486] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: zsojka at seznam dot cz @ 2023-09-19 18:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111486
           Summary: [14 Regression] ICE: in require, at machmode.h:313
                    with -O2 -march=rv64iv
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: riscv64-unknown-linux-gnu

Created attachment 55940
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55940&action=edit
reduced testcase

Compiler output:
$ riscv64-unknown-linux-gnu-gcc -O2 -march=rv64iv testcase.c 
during RTL pass: reload
testcase.c: In function 'foo':
testcase.c:8:1: internal compiler error: in require, at machmode.h:313
    8 | }
      | ^
0xa40cd2 opt_mode<machine_mode>::require() const
        /repo/gcc-trunk/gcc/machmode.h:313
0xa47091 opt_mode<machine_mode>::require() const
        /repo/gcc-trunk/gcc/config/riscv/riscv.cc:2546
0xa47091 riscv_legitimize_move(machine_mode, rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/config/riscv/riscv.cc:2543
0x1f1df10 gen_movdi(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/config/riscv/riscv.md:2024
0x10f1423 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*,
rtx_def*) const
        /repo/gcc-trunk/gcc/recog.h:411
0x10f1423 emit_move_insn_1(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/expr.cc:4164
0x10f183d emit_move_insn(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/expr.cc:4334
0x13070ec lra_emit_move(rtx_def*, rtx_def*)
        /repo/gcc-trunk/gcc/lra.cc:509
0x132295b curr_insn_transform
        /repo/gcc-trunk/gcc/lra-constraints.cc:4748
0x1324335 lra_constraints(bool)
        /repo/gcc-trunk/gcc/lra-constraints.cc:5488
0x130a3d4 lra(_IO_FILE*)
        /repo/gcc-trunk/gcc/lra.cc:2419
0x12bb629 do_reload
        /repo/gcc-trunk/gcc/ira.cc:5970
0x12bb629 execute
        /repo/gcc-trunk/gcc/ira.cc:6156
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ riscv64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-riscv64/bin/riscv64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-4143-20230919174842-gd2f53a601a2-checking-yes-rtl-df-extra-riscv64/bin/../libexec/gcc/riscv64-unknown-linux-gnu/14.0.0/lto-wrapper
Target: riscv64-unknown-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--with-cloog --with-ppl --with-isl --with-isa-spec=2.2
--with-sysroot=/usr/riscv64-unknown-linux-gnu --build=x86_64-pc-linux-gnu
--host=x86_64-pc-linux-gnu --target=riscv64-unknown-linux-gnu
--with-ld=/usr/bin/riscv64-unknown-linux-gnu-ld
--with-as=/usr/bin/riscv64-unknown-linux-gnu-as --disable-multilib
--disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-4143-20230919174842-gd2f53a601a2-checking-yes-rtl-df-extra-riscv64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20230919 (experimental) (GCC)

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

* [Bug target/111486] [14 Regression] ICE: in require, at machmode.h:313 with -O2 -march=rv64iv
  2023-09-19 18:52 [Bug target/111486] New: [14 Regression] ICE: in require, at machmode.h:313 with -O2 -march=rv64iv zsojka at seznam dot cz
@ 2023-09-20  6:01 ` rguenth at gcc dot gnu.org
  2023-09-21  8:25 ` cvs-commit at gcc dot gnu.org
  2023-10-17 12:58 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-09-20  6:01 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug target/111486] [14 Regression] ICE: in require, at machmode.h:313 with -O2 -march=rv64iv
  2023-09-19 18:52 [Bug target/111486] New: [14 Regression] ICE: in require, at machmode.h:313 with -O2 -march=rv64iv zsojka at seznam dot cz
  2023-09-20  6:01 ` [Bug target/111486] " rguenth at gcc dot gnu.org
@ 2023-09-21  8:25 ` cvs-commit at gcc dot gnu.org
  2023-10-17 12:58 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-21  8:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Lehua Ding <lhtin@gcc.gnu.org>:

https://gcc.gnu.org/g:38048fc501b3d53fc38c701ae4625024cd93bd1d

commit r14-4193-g38048fc501b3d53fc38c701ae4625024cd93bd1d
Author: Juzhe-Zhong <juzhe.zhong@rivai.ai>
Date:   Thu Sep 21 14:54:33 2023 +0800

    RISC-V: Fix SUBREG move of VLS mode[PR111486]

    This patch fixes this bug:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111486

    Before this patch, we can only handle (subreg:DI (reg:V8QI))

    The PR ICE:

    during RTL pass: reload
    testcase.c: In function 'foo':
    testcase.c:8:1: internal compiler error: in require, at machmode.h:313
        8 | }
          | ^
    0xa40cd2 opt_mode<machine_mode>::require() const
            /repo/gcc-trunk/gcc/machmode.h:313
    0xa47091 opt_mode<machine_mode>::require() const
            /repo/gcc-trunk/gcc/config/riscv/riscv.cc:2546
    0xa47091 riscv_legitimize_move(machine_mode, rtx_def*, rtx_def*)
            /repo/gcc-trunk/gcc/config/riscv/riscv.cc:2543
    0x1f1df10 gen_movdi(rtx_def*, rtx_def*)
            /repo/gcc-trunk/gcc/config/riscv/riscv.md:2024
    0x10f1423 rtx_insn* insn_gen_fn::operator()<rtx_def*, rtx_def*>(rtx_def*,
rtx_def*) const
            /repo/gcc-trunk/gcc/recog.h:411
    0x10f1423 emit_move_insn_1(rtx_def*, rtx_def*)
            /repo/gcc-trunk/gcc/expr.cc:4164
    0x10f183d emit_move_insn(rtx_def*, rtx_def*)
            /repo/gcc-trunk/gcc/expr.cc:4334
    0x13070ec lra_emit_move(rtx_def*, rtx_def*)
            /repo/gcc-trunk/gcc/lra.cc:509
    0x132295b curr_insn_transform
            /repo/gcc-trunk/gcc/lra-constraints.cc:4748
    0x1324335 lra_constraints(bool)
            /repo/gcc-trunk/gcc/lra-constraints.cc:5488
    0x130a3d4 lra(_IO_FILE*)
            /repo/gcc-trunk/gcc/lra.cc:2419
    0x12bb629 do_reload
            /repo/gcc-trunk/gcc/ira.cc:5970
    0x12bb629 execute
            /repo/gcc-trunk/gcc/ira.cc:6156

    Because of (subreg:DI (reg:V2QI))

            PR target/111486

    gcc/ChangeLog:

            * config/riscv/riscv.cc (riscv_legitimize_move): Fix bug.

    gcc/testsuite/ChangeLog:

            * gcc.target/riscv/rvv/autovec/pr111486.c: New test.

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

* [Bug target/111486] [14 Regression] ICE: in require, at machmode.h:313 with -O2 -march=rv64iv
  2023-09-19 18:52 [Bug target/111486] New: [14 Regression] ICE: in require, at machmode.h:313 with -O2 -march=rv64iv zsojka at seznam dot cz
  2023-09-20  6:01 ` [Bug target/111486] " rguenth at gcc dot gnu.org
  2023-09-21  8:25 ` cvs-commit at gcc dot gnu.org
@ 2023-10-17 12:58 ` rguenth at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-17 12:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
I assume fixed.

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

end of thread, other threads:[~2023-10-17 12:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-19 18:52 [Bug target/111486] New: [14 Regression] ICE: in require, at machmode.h:313 with -O2 -march=rv64iv zsojka at seznam dot cz
2023-09-20  6:01 ` [Bug target/111486] " rguenth at gcc dot gnu.org
2023-09-21  8:25 ` cvs-commit at gcc dot gnu.org
2023-10-17 12:58 ` rguenth 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).