From patchwork Sat Nov 26 07:17:08 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joern Rennecke X-Patchwork-Id: 127772 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id B20EF1007D1 for ; Sat, 26 Nov 2011 18:17:27 +1100 (EST) Received: (qmail 8642 invoked by alias); 26 Nov 2011 07:17:24 -0000 Received: (qmail 8632 invoked by uid 22791); 26 Nov 2011 07:17:23 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from c60.cesmail.net (HELO c60.cesmail.net) (216.154.195.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 26 Nov 2011 07:17:09 +0000 Received: from unknown (HELO epsilon2) ([192.168.1.60]) by c60.cesmail.net with ESMTP; 26 Nov 2011 02:17:08 -0500 Received: from host-92-29-210-76.as13285.net (host-92-29-210-76.as13285.net [92.29.210.76]) by webmail.spamcop.net (Horde MIME library) with HTTP; Sat, 26 Nov 2011 02:17:08 -0500 Message-ID: <20111126021708.kz9ae0eedcwgogc8-nzlynne@webmail.spamcop.net> Date: Sat, 26 Nov 2011 02:17:08 -0500 From: Joern Rennecke To: gcc-patches@gcc.gnu.org Subject: RFA: Fix PR middle-end/50074 MIME-Version: 1.0 User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On load-store architectures, the function address is generally loaded into a register before any outgoing arguments are stored in the stack frame (if any). Thus, generally allowing memory loads before any arguments of the sibcall have been stored in the stack frame is effective to make the sibcall-6.c test work again. This has been confirmed for Epiphany, x86_64-apple-darwin10 and s390x . Bootstrapped and regtested on i686-pc-linux-gnu. 2011-11-19 Joern Rennecke PR middle-end/50074 * calls.c (mem_overlaps_already_clobbered_arg_p): Return false if no outgoing arguments have been stored so far. Index: calls.c =================================================================== --- calls.c (revision 2195) +++ calls.c (working copy) @@ -1668,6 +1668,8 @@ mem_overlaps_already_clobbered_arg_p (rt { HOST_WIDE_INT i; + if (sbitmap_empty_p (stored_args_map)) + return false; if (addr == crtl->args.internal_arg_pointer) i = 0; else if (GET_CODE (addr) == PLUS