From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 41EE03858D38; Mon, 11 Sep 2023 16:59:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 41EE03858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694451597; bh=UIMQVbRYS/xk+gZfj3F+jTZxwJbnNnrz8D+iF+N2zYc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Os3t4yJqo6khNKesmhpd2f9zjgRikxTBt6qrEsUq5xb3pHAQmsyEmMfaustAHI45F Hlu0fQ9G/SHbni2fQJ12zTpIzehbHYUoTmo9WYKhZ1K0rasdrqHYrEdrsBdruTaZkC zA3q8qUKhyYZJ6AWDBQc/yEkhSEgMMsKotxKpe6g= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/111373] conditional selection gives bad code generation Date: Mon, 11 Sep 2023 16:59:57 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.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: 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=3D111373 --- Comment #4 from Andrew Pinski --- Actually this is what we have before expand: ``` if (_2 > _5) goto ; [50.00%] else goto ; [50.00%] ... if (v$2_7 < v$1_28) goto ; [33.33%] else goto ; [66.67%] [local count: 536870910]: [local count: 1073741824]: # a$1_18 =3D PHI # a$2_20 =3D PHI # a$0_29 =3D PHI *p_12(D) =3D a$0_29; MEM[(long int * *)p_12(D) + 8B] =3D a$1_18; MEM[(long int * *)p_12(D) + 16B] =3D a$2_20; return; [local count: 536870912]: if (_5 > _8) goto ; [50.00%] else goto ; [50.00%] ``` Anyways there is another bug dealing with phi and expansion somewhere=