From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BD5503858C30; Thu, 2 Feb 2023 08:55:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD5503858C30 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675328100; bh=YG35MguQ7giTx5MeL/f6P1/+OZpBKz3WNCFrnJBdtXc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=qWEjemlBihR7kvox0OXxSVsFwsPr+iRFIEELY1M803LdoGxuYf4yf5EdL0OfkPU4K TU2icxE4QdSeRl/RjCJXgymn4N7EOakIZZeNrpmA6eOEW0VFlGqoiOBpSjqqTcN7R0 vYB5uMwpk0XFJHbDusPUcquiHHrO3MI8sF75zq7Q= 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:55:00 +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 #23 from Tamar Christina --- (In reply to rguenther@suse.de from comment #22) > On Thu, 2 Feb 2023, tnfchris at gcc dot gnu.org wrote: >=20 > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108583 > >=20 > > --- 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 > >=20 > > So I think this is the only new IFN we'd need. basically we only need o= ne > > representing (a + b) >> n, for certain values of n we have a single ins= truction > > for others we reject it. >=20 > But the ISA only implements n =3D=3D width(a), so a true "highpart add". > So I'd add >=20 > OPTAB_D (sadd_highpart_optab, "sadd$a3_highpart") > OPTAB_D (uadd_highpart_optab, "uadd$a3_highpart") >=20 > only? That is it's QImode + QImode -> QImode with the carry bit in > the result (sign or zero-extended)? Sure that works I think, I'll do that then.=