From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 271413857C69; Wed, 22 Nov 2023 09:16:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 271413857C69 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1700644587; bh=hi/hacyTX2QyM4Sp93Min8x+JL7+4AJ0elzA4LElduY=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DrWpRetjh4nEu/C2snRqNRoY4+sKTpGRxZgHbvRdEhndg2yDBvVUA+S8Ko5HvjP+L xHMhtH7mEbxfiddgqpWURu08U0AplfOINx3AHI25tCFE/OORainPll8UihdITykMdk dPJL6gRHGTdtG1QZRibo9vj0Qho93CDVFHhWxfSg= From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/112657] [13/14 Regression] missed optimization: cmove not used with multiple returns Date: Wed, 22 Nov 2023 09:16:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 13.2.1 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com 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: 13.3 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 #3 from Uro=C5=A1 Bizjak --- (In reply to Andrew Pinski from comment #2) > Someone will have to debug ifcvt.cc to see why it fails on x86_64 but wor= ks > on aarch64. Note there are some new changes to ifcvt.cc in review which > might improve this, though I am not sure. x86_64 targetm.noce_conversion_profitable_p returns false for: (insn 20 0 19 (set (reg:SI 101) (const_int -9 [0xfffffffffffffff7])) 85 {*movsi_internal} (nil)) (insn 19 20 21 (set (reg:CCZ 17 flags) (compare:CCZ (reg/v:SI 99 [ c ]) (const_int 14 [0xe]))) 11 {*cmpsi_1} (nil)) (insn 21 19 0 (set (reg/v:SI 99 [ c ]) (if_then_else:SI (ne (reg:CCZ 17 flags) (const_int 0 [0])) (reg/v:SI 99 [ c ]) (reg:SI 101))) 1438 {*movsicc_noc} (nil))=