public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/104489] New: nvptx, sm_53: internal compiler error: in gen_rtx_SUBREG, at emit-rtl.cc:1022
Date: Thu, 10 Feb 2022 15:05:20 +0000	[thread overview]
Message-ID: <bug-104489-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 104489
           Summary: nvptx, sm_53: internal compiler error: in
                    gen_rtx_SUBREG, at emit-rtl.cc:1022
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

With patch:
...
$ git diff
diff --git a/gcc/config/nvptx/nvptx.h b/gcc/config/nvptx/nvptx.h
index edffd088b15a..8d389da679e4 100644
--- a/gcc/config/nvptx/nvptx.h
+++ b/gcc/config/nvptx/nvptx.h
@@ -32,7 +32,7 @@
 /* Default needs to be in sync with default for misa in nvptx.opt.
    We add a default here to work around a hard-coded sm_30 default in
    nvptx-as.  */
-#define ASM_SPEC "%{misa=*:-m %*; :-m sm_35}"
+#define ASM_SPEC "%{misa=*:-m %*; :-m sm_53}"

 #define TARGET_CPU_CPP_BUILTINS() nvptx_cpu_cpp_builtins ()

diff --git a/gcc/config/nvptx/nvptx.opt b/gcc/config/nvptx/nvptx.opt
index 93a678b63367..c89e658c82e0 100644
--- a/gcc/config/nvptx/nvptx.opt
+++ b/gcc/config/nvptx/nvptx.opt
@@ -72,7 +72,7 @@ Enum(ptx_isa) String(sm_80) Value(PTX_ISA_SM80)

 ; Default needs to be in sync with default in ASM_SPEC in nvptx.h.
 misa=
-Target RejectNegative ToLower Joined Enum(ptx_isa) Var(ptx_isa_option)
Init(PTX_ISA_SM35)

+Target RejectNegative ToLower Joined Enum(ptx_isa) Var(ptx_isa_option)
Init(PTX_ISA
_SM53)
 Specify the version of the ptx ISA to use.

 Enum
...
we run into:
...
during RTL pass: expand
/home/vries/nvptx/trunk/source-gcc/libgcc/libgcc2.c: In function ‘__mulhc3’:
/home/vries/nvptx/trunk/source-gcc/libgcc/libgcc2.c:1959:10: internal compiler
error: in gen_rtx_SUBREG, at emit-rtl.cc:1022
 1959 |   ac = a * c;
      |          ^
0xd9c1b7 gen_rtx_SUBREG(machine_mode, rtx_def*, poly_int<1u, unsigned long>)
        /home/vries/nvptx/trunk/source-gcc/gcc/emit-rtl.cc:1022
0xd9c22f gen_lowpart_SUBREG(machine_mode, rtx_def*)
        /home/vries/nvptx/trunk/source-gcc/gcc/emit-rtl.cc:1038
0xe0ef52 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /home/vries/nvptx/trunk/source-gcc/gcc/expr.cc:10677
0xe06316 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        /home/vries/nvptx/trunk/source-gcc/gcc/expr.cc:8736
0xde4ef9 expand_expr
        /home/vries/nvptx/trunk/source-gcc/gcc/expr.h:301
0xe0783c expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        /home/vries/nvptx/trunk/source-gcc/gcc/expr.cc:9070
0xc69dec expand_gimple_stmt_1
        /home/vries/nvptx/trunk/source-gcc/gcc/cfgexpand.cc:3967
0xc6a047 expand_gimple_stmt
        /home/vries/nvptx/trunk/source-gcc/gcc/cfgexpand.cc:4028
0xc7282a expand_gimple_basic_block
        /home/vries/nvptx/trunk/source-gcc/gcc/cfgexpand.cc:6069
0xc74cba execute
        /home/vries/nvptx/trunk/source-gcc/gcc/cfgexpand.cc:6795
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.
make[4]: *** [Makefile:501: _mulhc3.o] Error 1
...

             reply	other threads:[~2022-02-10 15:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-10 15:05 vries at gcc dot gnu.org [this message]
2022-02-10 15:18 ` [Bug target/104489] " vries at gcc dot gnu.org
2022-02-11 10:15 ` vries at gcc dot gnu.org
2022-02-11 10:18 ` roger at nextmovesoftware dot com
2022-02-14  9:06 ` burnus at gcc dot gnu.org
2022-02-23  7:26 ` cvs-commit at gcc dot gnu.org
2022-07-04 15:47 ` cvs-commit at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-104489-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).