From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24861 invoked by alias); 9 Jan 2014 09:34: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 24823 invoked by uid 48); 9 Jan 2014 09:34:00 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/59387] [4.9 Regression] wrong code (hangs) at -Os on x86_64-linux-gnu Date: Thu, 09 Jan 2014 09:34: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: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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.9.0 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-01/txt/msg00871.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59387 --- Comment #8 from Richard Biener --- (In reply to Jakub Jelinek from comment #7) > Unfortunately it triggers (sccp no longer optimizes) on quite a few > testcases: > > gcc.c-torture/execute/pr58277-1.c > gcc.c-torture/execute/pr58831.c > gcc.c-torture/execute/pr59387.c > gcc.dg/pr58010.c > gcc.dg/torture/pr55481.c > gcc.dg/torture/pr56366.c > gcc.dg/torture/pr59058.c > gcc.dg/torture/pr59245.c > gcc.dg/tree-ssa/loop-32.c > gcc.dg/tree-ssa/loop-33.c > gcc.dg/tree-ssa/loop-35.c > gcc.dg/tree-ssa/scev-6.c > > (the first test only for -m64, all the rest both -m32 and -m64, the last > even FAILs because of that). Couldn't we just transform that somehow into > an unsigned type computation instead in that case, at least for simple cases? You could leverage the code I added to LIM ... in the case where SCEV folded casts, of course.