From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15429 invoked by alias); 16 Jan 2013 22:49:45 -0000 Received: (qmail 14878 invoked by uid 48); 16 Jan 2013 22:48:53 -0000 From: "steven at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/48181] [4.6/4.7/4.8 Regression] wrong code with -O -fgcse --param ira-max-conflict-table-size=0 Date: Wed, 16 Jan 2013 22:49:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: steven at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.4 X-Bugzilla-Changed-Fields: CC 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/msg01581.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48181 Steven Bosscher changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hjl.tools at gmail dot com, | |steven at gcc dot gnu.org --- Comment #5 from Steven Bosscher 2013-01-16 22:48:49 UTC --- (In reply to comment #4) > But then, won't the exact same issues potentially happen in very large > functions where ira_conflicts_p isn't also true, because the conflict table > would be too big? Yup. 0 is a valid value for the parameter, just exposing a bug somewhere else. FWIW I can't reproduce the problem with trunk. I see rcx being saved and restored around the calls, e.g.: movq %rcx, (%rsp) call bar movq (%rsp), %rcx and likewise around the second memcpy. Unfortunately (an old) valgrind on gcc17 doesn't work with with "valgrind -q ./a.out" as in comment #0. It'd be interesting if and when this PR got fixed. HJ, is this something you can bisect?