From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 617823858D38; Wed, 8 Nov 2023 12:50:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 617823858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699447815; bh=kY2Qi2kGID8W3uqtQggPpjpzo2zAfnlrUMLM6hxOX1w=; h=From:To:Subject:Date:In-Reply-To:References:From; b=hzcgj8a7eLWcRQzgdp8KIYWehlmuv62jDJGLiE51KOX9kKu+lYWs7fmEmWQ4E22m0 7pcSIZYJf/6kzMTbomrjG2kIDdrB+ED/DMCJMFeZTMf55xLevQlTtRItXv0ktq0HYL /CgWHKJqOXttrF6PhR6wumVS6bpdP3TWwwFIhTR4= From: "acoplan at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112337] arm: ICE in arm_effective_regno when compiling for MVE Date: Wed, 08 Nov 2023 12:50:14 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: ice-on-valid-code, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: acoplan at gcc dot gnu.org X-Bugzilla-Status: NEW 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: Message-ID: In-Reply-To: References: 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=3D112337 --- Comment #8 from Alex Coplan --- (In reply to Vladimir Makarov from comment #7) > (In reply to Alex Coplan from comment #6) > > Confirmed. Here's a slightly cleaned up reproducer that doesn't warn: > >=20 > > #pragma GCC arm "arm_mve_types.h" > > int32x4_t h(void *p) { return __builtin_mve_vldrwq_sv4si(p); } > > void g(int32x4_t); > > void f(int, int, int, short, int *p) { > > int *bias =3D p; > > for (;;) { > > int32x4_t d =3D h(bias); > > bias +=3D 4; > > g(d); > > } > > } > >=20 > > ICEs with -O2 -march=3Darmv8.1-m.main+mve -mfloat-abi=3Dhard on the tru= nk. >=20 > Looking at the dump, I can guess INC/DEC operand is not a reg after IRA > temporary transformation. It can be fixed in arm.cc by checking that the > operand is reg instead of using the assert but it could be wrong because = the > documentation says the operand should be a reg. Also such solution would > not work for possible problem on other targets. >=20 > Could you provide me preprocessed test file. I'll try to find a solution = as > soon as possible. The quoted code above is a preprocessed testcase. FWIW, https://gcc.gnu.org/onlinedocs/gccint/Incdec.html seems to document t= hat mem inside pre_dec is valid. If that's no longer the case, we should update the documentation (and then IRA needs fixing). If the documentation is correct, then we need to fix this in arm.cc.=