From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6809D3858D38; Tue, 21 Nov 2023 21:53:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6809D3858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700603593; bh=7lz0BVztYTLezCB0Kx96seeR1+wG3Oaavlxr6theDt8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=lfdVyhxHUTlpUmG29Q5Xqzoow8xFU4cg3iGtY2m/6C8xuOT1Ktmor1hiG8eTnrnMU IKR7bnSv5mq38u+I9+xu3oUjU1THlRjopmiPQzpc1/9ECvjh61EE/Q1OSsOgr7bgr+ LmyKmhWd5b01JhW3+yizwa3EegOmLD7N2vA1YElE= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112657] missed optimization: cmove not used with multiple returns Date: Tue, 21 Nov 2023 21:53:13 +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.2.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: 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=3D112657 --- Comment #1 from Andrew Pinski --- It is converted to a csel on aarch64 so it is either ifcvt.cc rejecting the issue or a tuning issue with the x86_64 backend. x86_64: ``` IF-THEN-JOIN block found, pass 1, test 2, then 3, join 4 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D no more changes 1 possible IF blocks searched. 0 IF blocks converted. 0 true changes made. ``` vs aarch64: ``` IF-THEN-JOIN block found, pass 1, test 2, then 3, join 4 scanning new insn with uid =3D 30. scanning new insn with uid =3D 31. scanning new insn with uid =3D 32. if-conversion succeeded through noce_try_cmove ... ```=