From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 84911 invoked by alias); 7 Oct 2015 10:30:51 -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 84862 invoked by uid 55); 7 Oct 2015 10:30:47 -0000 From: "hjl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/67850] Wrong call_used_regs used in aggregate_value_p Date: Wed, 07 Oct 2015 10:30:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 6.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED 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: 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-10/txt/msg00503.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67850 --- Comment #2 from hjl at gcc dot gnu.org --- Author: hjl Date: Wed Oct 7 10:30:12 2015 New Revision: 228565 URL: https://gcc.gnu.org/viewcvs?rev=228565&root=gcc&view=rev Log: Merge ix86_maybe_switch_abi with ix86_set_current_function ix86_maybe_switch_abi is called to late during RTL expansion and we use the stale information from compilation of the previous function. aggregate_value_p uses call_used_regs. aggregate_value_p is used by IPA and return value optimization, which are called before ix86_maybe_switch_abi is called. This patch merges ix86_maybe_switch_abi with ix86_set_current_function. PR target/67850 * config/i386/i386.c (ix86_maybe_switch_abi): Merged with ... (ix86_set_current_function): This. (TARGET_EXPAND_TO_RTL_HOOK): Removed. Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.c