From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4DFFF3858C2C; Fri, 26 May 2023 12:06:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4DFFF3858C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685102803; bh=qeiGCJvQ2fYyHaVFIQVxz7YnRzqSAEyzBdVWM2/XmhQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=EE7p+2B/kPSyYCT4EhyVzXoVaUTh2xIWcOdimcAG0IxJkxZ4v5GL1IWIn0RcbnYV3 tudPPMddr5kGP92aF+6/EkGKvuQSs1rHrNGfi/CLdbBcKNHpfRNIBbMuGztb4AJqzF tM1hpfZMJEfK4CQ3+rWEEX6CPMRL3ZYRpxU7Bnpw= From: "benjsith at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/109973] [13/14 Regression] Wrong code for AVX2 since 13.1 by combining VPAND and VPTEST since r13-2006-ga56c1641e9d25e Date: Fri, 26 May 2023 12:06:42 +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: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: benjsith at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 13.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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109973 --- Comment #4 from Benji Smith --- Just as follow-up, I also tested the same code with _mm_and_si128/_mm_testc_si128 on SSE4.1, and the same issue repros (via `gcc -O1 -msse4.1`): #include int do_stuff(__m128i Y0, __m128i Y1, __m128i X2) { __m128i And01 =3D _mm_and_si128(Y0, Y1); int TestResult =3D _mm_testc_si128(And01, And01); return TestResult; }=