From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16112 invoked by alias); 17 Feb 2015 20:01: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 16049 invoked by uid 48); 17 Feb 2015 20:01:51 -0000 From: "law at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/62217] [4.9/5 Regression] DOM confuses complete unrolling which in turn causes VRP to warn Date: Tue, 17 Feb 2015 20:01: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.2 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: law at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.9.3 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: 2015-02/txt/msg01932.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62217 --- Comment #14 from Jeffrey A. Law --- WRT the patch in c#12, it looks reasonable for the same reasons as we avoid propagating in 23821. I can confirm that it prevents the unwanted cprop into array reference. By DOM2 we have the following array references: g_x[0] = *x2_9(D); g_x[0] = *x1_7(D); g_x[1] = *x2_9(D); g_x[1] = *x1_7(D); g_x[2] = *x2_9(D); g_x[2] = *x1_7(D); g_x[3] = *x1_7(D); g_x[3] = *x2_9(D); Assuming it bootstraps and regression tests, I'd go with it.