From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18511 invoked by alias); 30 Oct 2013 23:52:54 -0000 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 Received: (qmail 18453 invoked by uid 48); 30 Oct 2013 23:52:47 -0000 From: "congh at google dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/58915] [missed optimization] GCC fails to get the loop bound for some loops. Date: Wed, 30 Oct 2013 23:52: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-Version: 4.9.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: congh at google dot com X-Bugzilla-Status: NEW 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: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-10/txt/msg02258.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58915 --- Comment #2 from Cong Hou --- I am afraid that get_range_info () has little use here. The value range we care about may only exist under specific conditions and is hence flow sensitive. For example, we may need the value range of n in the if body: if (n > 0) if (n < 4) /* use of n */ However, n does not have a new name under the condition n>0 && n<4, making it impossible to get the range (0, 4) from the SSA_NAME of n.