From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 721 invoked by alias); 11 Jan 2013 10:48:32 -0000 Received: (qmail 640 invoked by uid 48); 11 Jan 2013 10:48:10 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/55936] Missed VRP optimization Date: Fri, 11 Jan 2013 10:48:00 -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-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status Last reconfirmed AssignedTo Ever Confirmed Known to fail Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg01000.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55936 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2013-01-11 AssignedTo|unassigned at gcc dot |rguenth at gcc dot gnu.org |gnu.org | Ever Confirmed|0 |1 Known to fail| |4.6.4, 4.7.2, 4.8.0 --- Comment #1 from Richard Biener 2013-01-11 10:48:08 UTC --- Confirmed. We should see that i = baz () is not executed. Visiting conditional with predicate: if (i_22 < 0) With known ranges i_22: [j_12(D), j_12(D)] EQUIVALENCES: { i_9(D) j_12(D) i_24 i_26 } (4 elements) Predicate evaluates to: DON'T KNOW that result happens because i_22 was computed as Visiting statement: i_22 = ASSERT_EXPR ; Intersecting [j_12(D), j_12(D)] EQUIVALENCES: { i_9(D) j_12(D) i_24 i_26 } (4 elements) and [10, 30] EQUIVALENCES: { i_9(D) i_26 } (2 elements) to [j_12(D), j_12(D)] EQUIVALENCES: { i_9(D) j_12(D) i_24 i_26 } (4 elements) Found new range for i_22: [j_12(D), j_12(D)] that's correct (equivalences have the [10, 30] range but they are not checked during predicate evaluation it seems, we could also have arbitrarily chosen [10, 30] instead of [j_12(D), j_12(D)] here) This means we compute i as VARYING.