From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 485673858C2D; Sun, 27 Nov 2022 06:40:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 485673858C2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669531200; bh=UaJa3FeBYIDcLKze7ASo84EJnmMCjGjlHTumn1YfMSE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=A1yP/g3WqB7tLB0LP9ngRTF6gVGooUASb9LnmEQ0+iZWEIKZXrNrTHroEJCtbceVz zwV6+yuY+WCJAPYfK0E3vgLuV5OTz2YsHfIdDiQJEOws9FrmTNMhQU0YXVDNA+At3Z 6wGD7rXVttRC897I+yRnZiafZ+63VP+aD57kpiZ4= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/88916] [x86] suboptimal code generated for integer comparisons joined with boolean operators Date: Sun, 27 Nov 2022 06:39:59 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 8.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement 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: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_known_to_work 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=3D88916 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Known to work| |13.0 --- Comment #4 from Andrew Pinski --- both_nonnegative looks to be fixed: movq %rdi, %rax orq %rsi, %rax notq %rax shrq $63, %rax ret _8 =3D a_4(D) | b_5(D); _9 =3D _8 >=3D 0; _6 =3D (int) _9; different_sign also seems to be fixed: .cfi_startproc xorq %rsi, %rdi shrq $63, %rdi movq %rdi, %rax ret _6 =3D a_2(D) ^ b_3(D); _1 =3D _6 < 0;=