From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 63BED3858C60; Mon, 19 Jun 2023 15:59:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 63BED3858C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687190378; bh=vB/Y8nHPCCrsqwvHDIce5sNeJw7rUcguDEbSEYeu/Rk=; h=From:To:Subject:Date:From; b=Z42/29q9kf/3IdfkI/TXGBeHi4uLuGYo/wyszlyjCMQtVtGahd3S+ehzWBJn0hvMN iHpW63I3Y8FXOxJ6232IMPtIoL2uxwQuNJchbH1rRIb9g+zIpB2+8Mxu2dh526EgtG T/tyRic2EkhS6A+IW1hBnOJGJW64aZEClSyT0rMY= From: "tschwinge at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110313] New: [14 Regression] GCN Fiji reload ICE in 'process_alt_operands' Date: Mon, 19 Jun 2023 15:59:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: openmp X-Bugzilla-Severity: normal X-Bugzilla-Who: tschwinge at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc target_milestone cf_gcctarget Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110313 Bug ID: 110313 Summary: [14 Regression] GCN Fiji reload ICE in 'process_alt_operands' Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: openmp Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: tschwinge at gcc dot gnu.org CC: ams at gcc dot gnu.org, burnus at gcc dot gnu.org, jule= s at gcc dot gnu.org Target Milestone: --- Target: GCN Between GCC commit 2720bbd597f56742a17119dfe80edc2ba86af255..bc6bd0d608da1609c1caeb04ab795a837= 20add55 (that is, 2023-05-30 - 2023-06-16) appeared some changes in GCC that cause = an ICE for a small number of libgomp offloading test cases, for GCN offloading only, and with (default) '-march=3Dfiji' only. [-PASS:-]{+FAIL: libgomp.c++/../libgomp.c-c++-common/for-9.c (internal compiler error: Segmentation fault)+} {+FAIL:+} libgomp.c++/../libgomp.c-c++-common/for-9.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c++/../libgomp.c-c++-common/for-9.c [-execution test-]{+compilation failed to produce executable+} [-PASS:-]{+FAIL: libgomp.c/../libgomp.c-c++-common/for-9.c (internal compiler error: Segmentation fault)+} {+FAIL:+} libgomp.c/../libgomp.c-c++-common/for-9.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/../libgomp.c-c++-common/for-9.c [-execution test-]{+compilation failed to produce executable+} The latter C++ variant not always observed. Additionally (same ICE), but so far observed on one system only, when runni= ng the exact same toolchain: [-PASS:-]{+FAIL: libgomp.c/../libgomp.c-c++-common/for-16.c (internal compiler error: Segmentation fault)+} {+FAIL:+} libgomp.c/../libgomp.c-c++-common/for-16.c (test for excess errors) [-PASS:-]{+UNRESOLVED:+} libgomp.c/../libgomp.c-c++-common/for-16.c [-execution test-]{+compilation failed to produce executable+} The ICE is: spawn -ignore SIGHUP gcc ../source-gcc/libgomp/testsuite/libgomp.c/../libgomp.c-c++-common/for-9.c -I../source-gcc/libgomp/testsuite/../../include -I../source-gcc/libgomp/testsuite/.. -fmessage-length=3D0 -fno-diagnostics-show-caret -fdiagnostics-color=3Dnever -fopenmp -O2 -lm -o ./for-9.exe during RTL pass: reload ../source-gcc/libgomp/testsuite/libgomp.c/../libgomp.c-c++-common/for-2= .h: In function 'f20_dpf_ds128_runtime': =20=20=20 ../source-gcc/libgomp/testsuite/libgomp.c/../libgomp.c-c++-common/for-2.h:3= 46:1: internal compiler error: Segmentation fault 0xe28adf crash_signal [...]/source-gcc/gcc/toplev.cc:314 0xc19737 process_alt_operands [...]/source-gcc/gcc/lra-constraints.cc:2789 0xc19737 curr_insn_transform [...]/source-gcc/gcc/lra-constraints.cc:4201 0xc1ed0e lra_constraints(bool) [...]/source-gcc/gcc/lra-constraints.cc:5396 0xbff652 lra(_IO_FILE*) [...]/source-gcc/gcc/lra.cc:2396 0xb9c639 do_reload [...]/source-gcc/gcc/ira.cc:5967 0xb9c639 execute [...]/source-gcc/gcc/ira.cc:6153 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See for instructions. gcn mkoffload: fatal error: x86_64-pc-linux-gnu-accel-amdgcn-amdhsa-gcc returned 1 exit status compilation terminated. lto-wrapper: fatal error: [...]/amdgcn-amdhsa/mkoffload returned 1 exit status 'gcc/lra-constraints.cc': 2778 if (operand_reg[nop] !=3D NULL_RTX 2779 /* Output operands and matched input operands are 2780 not inherited. The following conditions do n= ot 2781 exactly describe the previous statement but t= hey 2782 are pretty close. */ 2783 && curr_static_id->operand[nop].type !=3D OP_OUT 2784 && (this_alternative_matches < 0 2785 || curr_static_id->operand[nop].type !=3D OP= _IN)) 2786 { 2787 int last_reload =3D (lra_reg_info[ORIGINAL_REGNO 2788 (operand_reg[nop= ])] 2789 .last_reload); Tobias mentioned that 'operand_reg[nop]' is '(reg/f:DI 16 s16 [3483])'. It was "obvious" to try, but reverting Vlad's three recent commits: - commit r14-1891-g154c69039571c66b3a6d16ecfa9e6ff22942f59f "RA: Ignore conflicts for some pseudos from insns throwing a final exception" - commit r14-1610-g8cc8707446b77f9413654b31704f5a639673c916 "RA: Constrain class of pic offset table pseudo to general regs" - commit r14-1417-g30038a207c10a2783fa2695b62c7c8458ef05e73 "LRA: Update = insn sp offset if its input reload changes SP" ... does *not* cure this issue. I've not yet tested with a non-offloading, GCN target toolchain (... with (default) '-march=3Dfiji'). I'm now bisecting. Once we've located the "offender", I'll see about providing a reproducer --= if necessary.=