From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DE27F3858401; Thu, 2 Feb 2023 08:03:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE27F3858401 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675324997; bh=q+1qkdIcytvFUv6rKWlRxQRJptF58V/3NtMZwuSCufo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=odE9yhljqncKpYff91YIMbHfjFbFDwXIkiMxmbZ3UA5j18dFmRI81wJYsR9t2mZn9 Xj8Xbliy1G/DXY4QWl8f1sAzJwNVHTRzkdrcBxk5oT3czhTXdl4cMCPE4sSVe4fIZW 68BMWyCz/3Vryczm3BMd1o/nK7F3S4qQA+Z8hg+c= From: "tnfchris at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108583] [13 Regression] wrong code with vector division by uint16 at -O2 Date: Thu, 02 Feb 2023 08:03:10 +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: 13.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: tnfchris at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: tnfchris at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.0 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=3D108583 --- Comment #21 from Tamar Christina --- >=20 > OK, so that's an ADD_HIGHPART_EXPR then? Though the highpart of an > add is only a single bit, isn't it? For scalar you'd use the > carry bit here and instructions like adc to consume it. Is addhn > to do such thing on vectors? >=20 So I think this is the only new IFN we'd need. basically we only need one representing (a + b) >> n, for certain values of n we have a single instruc= tion for others we reject it. So I think we can just do two of these back to back and that should work. = If this is ok I can implement it today.=