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 ...