From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3104 invoked by alias); 9 Jan 2013 15:11:27 -0000 Received: (qmail 2983 invoked by uid 55); 9 Jan 2013 15:10:58 -0000 From: "hubicka at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/55875] [4.8 Regression] IVopts caused miscompilation Date: Wed, 09 Jan 2013 15:11: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: hubicka at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: 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/msg00816.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55875 --- Comment #10 from Jan Hubicka 2013-01-09 15:10:55 UTC --- Author: hubicka Date: Wed Jan 9 15:10:43 2013 New Revision: 195054 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195054 Log: PR tree-optimiation/55875 * gcc.c-torture/execute/pr55875.c: New testcase. * g++.dg/torture/pr55875.C: New testcase. * tree-ssa-loop-niter.c (number_of_iterations_cond): Add EVERY_ITERATION parameter. (number_of_iterations_exit): Check if exit is executed every iteration. (idx_infer_loop_bounds): Similarly here. (n_of_executions_at_most): Simplify to only test for cases where statement is dominated by the particular bound; handle correctly the "postdominance" test. (scev_probably_wraps_p): Use max loop iterations info as a global bound first. Added: trunk/gcc/testsuite/g++.dg/torture/pr55875.C trunk/gcc/testsuite/gcc.c-torture/execute/pr55875.c Modified: trunk/gcc/ChangeLog trunk/gcc/testsuite/ChangeLog trunk/gcc/tree-ssa-loop-niter.c