From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31374 invoked by alias); 5 May 2014 13:41:03 -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 31319 invoked by uid 48); 5 May 2014 13:40:58 -0000 From: "glisse at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/61034] Optimizing takes too many passes Date: Mon, 05 May 2014 13:41: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.10.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: glisse 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-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: 2014-05/txt/msg00273.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61034 --- Comment #7 from Marc Glisse --- (In reply to rguenther@suse.de from comment #6) > that's a conditional assignment AFAICS Ah, you are right of course. It shouldn't be conditional, but it will take a VRP pass to notice that. If I schedule another FRE right after VRP1, things optimize nicely, and after some cleanup by DOM+DSE, DCE2 can remove all malloc+free. However, if I don't add this extra FRE pass, we somehow don't manage. Note that in the PRE dump, with just your patch (no extra pass), I see: pretmp_92 = 1; _235 = pretmp_92; if (_235 == 0) and these conditions seem to be what prevents us from finishing the job.