From patchwork Wed Feb 3 23:34:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Meissner X-Patchwork-Id: 578640 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id CA8E2140BF5 for ; Thu, 4 Feb 2016 10:34:52 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=XaRGlXTG; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=qIEHlxVTQV3EIa9BVWdwImWRjAaVNtvjclujIFYyK+ecGH8iKiwd3 zJn4zoqlOtFA4hTtR8LQEmMJ84H2WoVaGjY/vrgk3+zo7MnHqhbmQtb4yKqPshej ZCJ5N0jj2y488yc+CCbm97LGZr22fZuJOzOy1ddGIS7nGijiUMF3HY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=rnOjb3WclhrCNwiwJsJrHj3cmJc=; b=XaRGlXTGA27omk7TYWA3 vSLYlNn9/vbFI00ifaZANcBvIXyoxMyLeHize4CDIlHDu47zEg8qNrlr4qOS2oS3 ux+5Jzt9e+fp9or/r2TBICBadadLuGGatoH1aSRlrfCra1CFH3B0gOOgUhE9F0cn 63OYh8SNefrttO7xs6ZylKo= Received: (qmail 2505 invoked by alias); 3 Feb 2016 23:34:45 -0000 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 Received: (qmail 2487 invoked by uid 89); 3 Feb 2016 23:34:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.5 required=5.0 tests=AWL, BAYES_50, KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 spammy=XINT, xint, fused, VSX X-HELO: e38.co.us.ibm.com Received: from e38.co.us.ibm.com (HELO e38.co.us.ibm.com) (32.97.110.159) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 03 Feb 2016 23:34:41 +0000 Received: from localhost by e38.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 3 Feb 2016 16:34:38 -0700 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e38.co.us.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 3 Feb 2016 16:34:35 -0700 X-IBM-Helo: d03dlp03.boulder.ibm.com X-IBM-MailFrom: meissner@ibm-tiger.the-meissners.org X-IBM-RcptTo: gcc-patches@gcc.gnu.org Received: from b03cxnp08027.gho.boulder.ibm.com (b03cxnp08027.gho.boulder.ibm.com [9.17.130.19]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 4AC0619D8040 for ; Wed, 3 Feb 2016 16:22:34 -0700 (MST) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u13NYYxp28180628 for ; Wed, 3 Feb 2016 16:34:35 -0700 Received: from d03av02.boulder.ibm.com (localhost [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u13NYYlJ014174 for ; Wed, 3 Feb 2016 16:34:34 -0700 Received: from ibm-tiger.the-meissners.org (dhcp-9-32-77-111.usma.ibm.com [9.32.77.111]) by d03av02.boulder.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id u13NYYPv014133; Wed, 3 Feb 2016 16:34:34 -0700 Received: by ibm-tiger.the-meissners.org (Postfix, from userid 500) id 11F6345FA9; Wed, 3 Feb 2016 18:34:33 -0500 (EST) Date: Wed, 3 Feb 2016 18:34:33 -0500 From: Michael Meissner To: gcc-patches@gcc.gnu.org, dje.gcc@gmail.com Subject: [PATCH], PR 69461, PowerPC specific fix for toc-fusion Message-ID: <20160203233433.GA19926@ibm-tiger.the-meissners.org> Mail-Followup-To: Michael Meissner , gcc-patches@gcc.gnu.org, dje.gcc@gmail.com MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16020323-0029-0000-0000-000010332DC0 X-IsSubscribed: yes In PR 69461, Vlad mentioned that in rs6000_legitimate_address_p, I was trying to validate an address for TOC fusion, but I was using a predicate that looked for a MEM instead of an address. I bootstrapped the compiler on a little endian power8 and there were no regressions. In addition, Segher Boessenkool, says that with Vlad's patch and this patch, it fixes a lot of the errors that he was looking at. Is the patch ok to check in? 2016-02-03 Michael Meissner Vladimir Makarov PR target/69461 * config/rs6000/rs6000.c (rs6000_legitimate_address_p): Fix thinko in validating fused toc addresses. Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c (revision 233107) +++ gcc/config/rs6000/rs6000.c (working copy) @@ -8399,7 +8399,8 @@ rs6000_legitimate_address_p (machine_mod && legitimate_constant_pool_address_p (x, mode, reg_ok_strict || lra_in_progress)) return 1; - if (reg_offset_p && reg_addr[mode].fused_toc && toc_fusion_mem_wrapped (x, mode)) + if (reg_offset_p && reg_addr[mode].fused_toc && GET_CODE (x) == UNSPEC + && XINT (x, 1) == UNSPEC_FUSION_ADDIS) return 1; /* For TImode, if we have load/store quad and TImode in VSX registers, only allow register indirect addresses. This will allow the values to go in