From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 56270385803D; Tue, 17 May 2022 10:11:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 56270385803D From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/105613] [13 Regression] wrong code with unsigned V1TI comparison since r13-458-gd75d4293dcc029 Date: Tue, 17 May 2022 10:11:54 +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: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jakub 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 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: Tue, 17 May 2022 10:11:54 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105613 --- Comment #6 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:254cbf72661b932eb039220fccef9a2546ab8f4e commit r13-552-g254cbf72661b932eb039220fccef9a2546ab8f4e Author: Jakub Jelinek Date: Tue May 17 12:10:30 2022 +0200 i386: Fix up V2DI and V1TI inequality comparisons [PR105613] The recent r13-458 change to introduce vec_cmpeqv1tiv1ti and add TARGET_SSE2 support to vec_cmpeqv2div2di works nicely for equality comparisons, but as the testcase shows doesn't work for inequality comparisons. For EQ if we perform comparison with twice as many half-sized elemenets, the result should be ~0 when both halves are ~0 only (both halves need to be equal for the whole to be equal), otherwise 0, so AND is the correct operation for it. But for NE, the result should be ~0 when either of the halves is ~0 (if either half is not equal, the whole is not equal) and so the right operation for NE is IOR, not AND. 2022-05-17 Jakub Jelinek PR target/105613 * config/i386/sse.md (vec_cmpeqv2div2di, vec_cmpeqv1tiv1ti): Use andv4si3 only for EQ, for NE use iorv4si3 instead. * gcc.c-torture/execute/pr105613.c: New test.=