From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 811 invoked by alias); 6 Nov 2012 17:25:55 -0000 Received: (qmail 710 invoked by uid 48); 6 Nov 2012 17:25:33 -0000 From: "amylaar at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/55195] [4.8 Regression] shorten_branches generates incorrect forward branch distances Date: Tue, 06 Nov 2012 17:25:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: amylaar at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: 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: 2012-11/txt/msg00500.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55195 --- Comment #12 from Jorn Wolfgang Rennecke 2012-11-06 17:25:30 UTC --- One way to get the maximum right would be to change genattrtab:max_attr_value too process umax and/or smax, and use that to encapsulate the symbol_ref. longer term, i think it would be nice if we had rtx codes that not so much min/max, but assert that a value is in a given range; with gcc_assert in the generaed function. We could use one to assert a range that is invaiant during branch shortening, and another one that is variant.