From patchwork Thu Oct 13 20:08:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diego Novillo X-Patchwork-Id: 119597 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 AE73DB6F89 for ; Fri, 14 Oct 2011 07:08:58 +1100 (EST) Received: (qmail 31079 invoked by alias); 13 Oct 2011 20:08:56 -0000 Received: (qmail 31066 invoked by uid 22791); 13 Oct 2011 20:08:54 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 13 Oct 2011 20:08:29 +0000 Received: from hpaq11.eem.corp.google.com (hpaq11.eem.corp.google.com [172.25.149.11]) by smtp-out.google.com with ESMTP id p9DK8Rie027560; Thu, 13 Oct 2011 13:08:28 -0700 Received: from topo.tor.corp.google.com (topo.tor.corp.google.com [172.29.41.2]) by hpaq11.eem.corp.google.com with ESMTP id p9DK8P9X013930; Thu, 13 Oct 2011 13:08:25 -0700 Received: by topo.tor.corp.google.com (Postfix, from userid 54752) id DD94E1DA1D2; Thu, 13 Oct 2011 16:08:24 -0400 (EDT) To: reply@codereview.appspotmail.com, crowl@google.com, gcc-patches@gcc.gnu.org Subject: [pph] Fix builtin merges (issue5276044) Message-Id: <20111013200824.DD94E1DA1D2@topo.tor.corp.google.com> Date: Thu, 13 Oct 2011 16:08:24 -0400 (EDT) From: dnovillo@google.com (Diego Novillo) X-System-Of-Record: true X-IsSubscribed: yes 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 Computing the assembler name of a builtin function prevents the middle-end from open coding the builtin. This was causing assembly --- This patch is available for review at http://codereview.appspot.com/5276044 differences between the non-pph and pph compiles. Tested on x86_64. Committed to branch. Diego. cp/ChangeLog.pph * pph-streamer.c (pph_merge_name): Do not mangle names for builtin functions. testsuite/ChangeLog.pph * g++.dg/pph/p2pr36533.cc: Mark fixed. * g++.dg/pph/p4mean.cc: Likewise. * g++.dg/pph/p4pr36533.cc: Likewise. diff --git a/gcc/cp/pph-streamer.c b/gcc/cp/pph-streamer.c index 7bcff92..ed2dfca 100644 --- a/gcc/cp/pph-streamer.c +++ b/gcc/cp/pph-streamer.c @@ -577,7 +577,7 @@ pph_get_signature (tree t, size_t *nbytes_p) tree pph_merge_name (tree expr) { - if (TREE_CODE (expr) == FUNCTION_DECL) + if (TREE_CODE (expr) == FUNCTION_DECL && !DECL_BUILT_IN (expr)) return DECL_ASSEMBLER_NAME (expr); else return DECL_NAME (expr); diff --git a/gcc/testsuite/g++.dg/pph/p2pr36533.cc b/gcc/testsuite/g++.dg/pph/p2pr36533.cc index 8ff602a..3797327 100644 --- a/gcc/testsuite/g++.dg/pph/p2pr36533.cc +++ b/gcc/testsuite/g++.dg/pph/p2pr36533.cc @@ -1,6 +1,2 @@ /* { dg-options "-w -fpermissive" } */ -// pph asm xdiff 25347 -// xfail BOGUS INTRINSIC -// failing to recognise memset as an intrinsic - #include "p1pr36533.h" diff --git a/gcc/testsuite/g++.dg/pph/p4mean.cc b/gcc/testsuite/g++.dg/pph/p4mean.cc index 80c2db6..e832ce5 100644 --- a/gcc/testsuite/g++.dg/pph/p4mean.cc +++ b/gcc/testsuite/g++.dg/pph/p4mean.cc @@ -1,8 +1,4 @@ /* { dg-options "-w -fpermissive" } */ -// pph asm xdiff 39234 -// xfail BOGUS INTRINSIC -// failing to recognize sqrt as an intrinsic - #include #include #include diff --git a/gcc/testsuite/g++.dg/pph/p4pr36533.cc b/gcc/testsuite/g++.dg/pph/p4pr36533.cc index b230095..1fd03fa 100644 --- a/gcc/testsuite/g++.dg/pph/p4pr36533.cc +++ b/gcc/testsuite/g++.dg/pph/p4pr36533.cc @@ -1,6 +1,2 @@ /* { dg-options "-w -fpermissive" } */ -// pph asm xdiff 25347 -// xfail BOGUS INTRINSIC -// failing to recognise memset as an intrinsic - #include "p4pr36533.h"