From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E7853388E839; Fri, 5 Jun 2020 09:01:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E7853388E839 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1591347687; bh=Am/sO+CO9SSl7z2U1B7GkCY7o5rPhY67maF8bf2ANIo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lsDUuWyC/U4WLgzTfF8JpHjaPTLtmRwK0YeePP/shbzG/5Ulr2KpmkL35f83839ub uwyf0mo9VPRFmWeLaUVNjC2DVIkB5qCV+987mJ5mVz0kEGG1MqOckN4pFFK0Thz8RS k2clpd5m1efciICRZ23bCwp7hwlARXS7dxz1ZFbk= From: "rsandifo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/95528] [10/11 Regression] internal compiler error: in emit_move_insn, at expr.c:3814 Date: Fri, 05 Jun 2020 09:01:27 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 10.1.0 X-Bugzilla-Keywords: ice-on-valid-code, needs-bisection X-Bugzilla-Severity: normal X-Bugzilla-Who: rsandifo 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: 10.2 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Jun 2020 09:01:28 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95528 --- Comment #6 from rsandifo at gcc dot gnu.org --- (In reply to Jakub Jelinek from comment #4) > I'd say the vectorizer/simplify_vector_constructor just shouldn't attempt= to > use these (e.g. vec_pack*, vec_unpack* optabs) for !VEC_MODE_P unless it = is > VECTOR_BOOLEAN_TYPE_P type. > For i386 it would be the right thing as the patterns really assume that it > is vector booleans and have their properties. > Though, aarch64 seems to have vec_pack_trunc_di and vec_pack_trunc_df > expanders, it is unclear to me what they are for and if they are really u= sed. > Other targets seem to only define these for vector modes. Yeah, I agree those look odd. The covering note for the patch that added them was: https://gcc.gnu.org/pipermail/gcc-patches/2013-April/361636.html which talks about fixing gcc.dg/vect failures. But as James says, only the 128-bit patterns should be needed for that. Maybe the the 64-bit patterns were just added for completeness. Perhaps one justification for _di is that there is no V1DI mode. Instead a vector of 1 DImode would itself have mode DImode. So in principle, vec_pack_trunc_di is probably the right name for a (V1)DI->V2SI truncate. The same doesn't apply to _df since we don't use scalar float modes for V1 vectors. And (unlike at the time of the patch) we now have V1DF. So I agree that the _df one looks dead. That said, for AArch64 we'd now try to mix 128-bit and 64-bit vectors instead of vectorising with 2 64-bit vectors. So the _di pattern probably isn't useful in practice either. In summary: from an AArch64 perspective, it's probably fine to check !VECTOR_MODE_P || VECTOR_BOOLEAN_TYPE_P. But given the V1 thing, maybe it would be better to add || m =3D=3D GET_MODE_INNER (m) as well (unless that defeats the fix).=