From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8552F3858D38; Mon, 30 Jan 2023 14:31:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8552F3858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675089064; bh=lZuji1rdsvG5m3AOs6QMRUXLvBdiIcMxSp8OdrTI7tc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Xfw2Vkc1tQDS19vJTk37QeNpvDJm1/ZqeJhfYhx2CvRLy3hIPn2SEtT35OfFgpP42 a8/axLxDC4Mt8N8kJX7fHFQjOu7N0e+aTgKmT5Vv66NgnX3JuVyydaQGtmgMwzsz6y U97PaR/aiJ0LUsXdPXa5SKip9GNFrVvQy0fNIspI= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108599] [12/13 Regression] Incorrect code generation newer intel architectures Date: Mon, 30 Jan 2023 14:31:04 +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: 12.1.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.3 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=3D108599 --- Comment #6 from Jakub Jelinek --- The bug is in ix86_convert_const_wide_int_to_broadcast. It is called with OImode and (const_wide_int 0x100000000000000010), that CONST_WIDE_INT is actually usab= le as broadcast from DImode 0x10, but only to TImode, not OImode nor XImode. /* Check if OP can be broadcasted from VAL. */ for (int i =3D 1; i < CONST_WIDE_INT_NUNITS (op); i++) if (val !=3D CONST_WIDE_INT_ELT (op, i)) return nullptr; checks all elements of the CONST_WIDE_INT, but nothing checks that it has t= he expected number of elements... Note, 0 and -1 shouldn't happen here, those would be CONST_INT rather than CONST_WIDE_INT and all the others have to use the right number of CONST_WIDE_INT_NUNITS in order to be broadcastable.=