From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B4F093858D35; Mon, 7 Nov 2022 06:58:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B4F093858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667804303; bh=9XprcNods5mihx8t+aaxGuYs5xfkT3HgG4I0ltQaA2I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bh9I+ffiQEc3yxAKd8nssU0lHPBJG6vfgpe9L0T0w5JsqCXI/l+Y3KBmBs+yUvtyU OfDn9zL5taWZoSqGeZ1wm6ptBPxmtJDJWsQkMd2cxukWufyDa5IdI5l00H5t8BgZfK wejLYiX0bvZvzAX8sagqqjBmW+clEwiJFTFxr1a8= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/107546] [10/11/12/13 Regression] simd, redundant pcmpeqb and pxor Date: Mon, 07 Nov 2022 06:58:23 +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.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: short_desc target_milestone 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=3D107546 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|simd, redundant pcmpeqb and |[10/11/12/13 Regression] |pxor |simd, redundant pcmpeqb and | |pxor Target Milestone|--- |10.5 --- Comment #2 from Andrew Pinski --- For GNU C++ vectors produced GCC 4.8 until GCC 11 produced: movdqa xmm0, XMMWORD PTR [rdi] pcmpeqd xmm1, xmm1 pcmpgtb xmm0, XMMWORD PTR .LC0[rip] pandn xmm0, xmm1 ret GCC 11+ produces: movdqa xmm0, XMMWORD PTR [rdi] pxor xmm1, xmm1 pcmpgtb xmm0, XMMWORD PTR .LC0[rip] pcmpeqb xmm0, xmm1 ret But the intrinics produced the expected thing until GCC 9. in GCC 8 the intrinsics produces: _3 =3D VEC_COND_EXPR <_4 < { 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, = 48, 48, 48, 48, 48 }, { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,= -1, -1 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }>; even. Notice the < vs <=3D there. I suspect the <=3D expansion part of the x86_64 backend needs to be fixed u= p to produce better code. So this is a regression for the intrinsics and marking it as such.=