From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 124221 invoked by alias); 19 Jun 2015 15:25:39 -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 124181 invoked by uid 48); 19 Jun 2015 15:25:35 -0000 From: "alalaw01 at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/57600] Turn 2 comparisons into 1 with the min Date: Fri, 19 Jun 2015 15:25: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: alalaw01 at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: 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: cc 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-06/txt/msg01744.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57600 alalaw01 at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |alalaw01 at gcc dot gnu.org --- Comment #5 from alalaw01 at gcc dot gnu.org --- (In reply to Marc Glisse from comment #2) > > Or do we want to do the transformation always, and maybe have something > later (in RTL?) to undo it if it didn't help? > > Note that in some experiments with more meat in the loop, having > i some optimizations. Can you give an example where it not only doesn't help, but actually hurts? Are they all just because of not seeing analysis properties, i.e. we could get there by realizing a<=min(a,...) and looking far enough to see a