From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E6A2C385DC14; Wed, 15 Apr 2020 10:23:20 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E6A2C385DC14 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586946200; bh=NIlXDUFy6LjvzFu6XOYRP872G3b7RkcIM3Hc4xhCWOA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=gjxH3MWxIkctcaKd9zZLoddh4jAr9g14kH5b4e13SK+AMleR9CeZUn/N/VdTg17jy /uP+O83qxJZKPbCv8s3//Q2goWtJVKkQ/f67ZpKo7rSotxzMmiI0hPgOisozFPplKQ t2Gltzs6reINothg2VLueZjk7/icqeAt76yjXjrw= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/94566] conversion between std::strong_ordering and int Date: Wed, 15 Apr 2020 10:23:20 +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: 10.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rguenth 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: blocked dependson 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2020 10:23:21 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94566 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|11832, 33315 | Depends on| |33315 --- Comment #2 from Richard Biener --- I've verified my old fix for PR33315 does t.C:11:45: optimized: sinking common stores to D.8528._M_value ... conv2 (int i) { struct strong_ordering D.8528; int _7; [local count: 1073741817]: switch (i_2(D)) [0.00%], case -1: [33.33%], case 0: <= L1> [33.33%], case 1: [33.33%]> [local count: 357913942]: : goto ; [100.00%] [local count: 357913942]: : goto ; [100.00%] [count: 0]: : __builtin_unreachable (); [local count: 1073741824]: # _7 =3D PHI <-1(2), 0(3), 1(4)> : D.8528._M_value =3D _7; return D.8528; still not optimized further tho. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D11832 [Bug 11832] Optimization of common stores in switch statements https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D33315 [Bug 33315] stores not commoned by sinking=