From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28099 invoked by alias); 8 May 2015 17:50:08 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 28086 invoked by uid 89); 8 May 2015 17:50:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 08 May 2015 17:50:06 +0000 Received: from KLMAIL01.kl.imgtec.org (unknown [192.168.5.35]) by Websense Email Security Gateway with ESMTPS id B2DA332A00886; Fri, 8 May 2015 18:50:00 +0100 (IST) Received: from BAMAIL02.ba.imgtec.org (10.20.40.28) by KLMAIL01.kl.imgtec.org (192.168.5.35) with Microsoft SMTP Server (TLS) id 14.3.195.1; Fri, 8 May 2015 18:50:03 +0100 Received: from ubuntu-sellcey.mips.com (10.20.3.58) by bamail02.ba.imgtec.org (10.20.40.28) with Microsoft SMTP Server id 14.3.174.1; Fri, 8 May 2015 10:50:00 -0700 Received: by ubuntu-sellcey.mips.com (sSMTP sendmail emulation); Fri, 08 May 2015 10:50:00 -0700 From: "Steve Ellcey " Date: Fri, 08 May 2015 17:50:00 -0000 To: , , Subject: Question about patch for PR bootstrap/65150 (identical functions) User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-ID: <31d77709-70c7-4e6c-805d-b701f8067deb@BAMAIL02.ba.imgtec.org> X-SW-Source: 2015-05/txt/msg00714.txt.bz2 Jan and Martin, I just noticed that your patch for PR bootstrap/65150 broke one of the MIPS tests (gcc.target/mips/branch-1.c). I can fix the test with no problem but I am wondering if the change I am seeing with your patch is intended or not. A cutdown version of the test is: void bar (void); void f1 (int x) { if (x & 4) bar (); } void f2 (int x) { if ((x >> 2) & 1) bar (); } After your change GCC sees that the code for f1 and f2 are identical so it replaced the body of f2 with a call to f1. This optimization will save space but it is not going to be faster because any call to f2 will now include an extra call/return. Do other platforms have this same issue or is there a way to make f2 an alias for f1 on other targets so no extra call is needed? I looked around to see if there was a target function or macro that is used to make one function an alias of another but I didn't see anything. Steve Ellcey sellcey@imgtec.com