From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id C80B83858C53; Mon, 7 Nov 2022 07:16:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C80B83858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667805387; bh=hxyt2lY8Ed7P5+KDCaCBWqY/0g85sVP0YbwK04e7FNI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=V1PBIyB5tZDLn/JkaG6rx/VdUbXp6q6nCkxVvUAZxWpTluz5MuiAicOxdjG7eGD7q q2kPJZIXtQPJCnY0PH2RHmXFsmAaAOzu6TGNzbboY+jwLqlVgNpD/GPwAy43YSinep Vm/MtN3oS75QJPVkJI2i/jnu4uy+xjedL4PFikJg= From: "glisse 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 07:16:27 +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: glisse at gcc dot gnu.org 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: 10.5 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=3D107546 --- Comment #5 from Marc Glisse --- typedef signed char v16qs __attribute__((vector_size(16))); auto bar(v16qs x) { return x < 48; } clang does expand it as 48 gt x. Gcc however does its usual change to x <= =3D 47, which it then tries to expand as ~(x > 47). I guess the expansion for x <= =3D y could be tweaked in the case where one argument is constant to undo what was done earlier in the pipeline and expand as 48 > x.=