From patchwork Thu Aug 4 05:14:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alan Modra X-Patchwork-Id: 655674 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 3s4dRV3Bqsz9t0P for ; Thu, 4 Aug 2016 15:15:00 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=RWZwwU5J; 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:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=sHYV1x9oJc8GFyuPh HGHvL8pv+Ie3azuhv31Ibw6xBO/O0D8J/C4FhLoA6WTFkBbyPWDEGIWpvH2zaebX lVnJ/Zffdpw++NgDuBDyt/DHlP8Es6LZQ4KoLoknvQkAT1LK06JDjuLmudU7BKHN T0/TSBIFnG/WpOKOD56SfH/ml4= 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:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=itlsLqsgVwwFcSmrPh+f9kM 8Dow=; b=RWZwwU5J+W0qKq16JQiW0VlIH48GqO/Q95udlGFWOr2T6deq6xCZ8mB rOeFEIyCNPr9i6JUZZvSC2onl1eRrHl6fYrFzmno91p9sbRC+2ugr6WGcGT3E3mz HZ2MKjbG13LGKWib1XSKEnYP4Rk7uA86w1cSMalrhV+gXnjG1/X8= Received: (qmail 29744 invoked by alias); 4 Aug 2016 05:14:53 -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 29731 invoked by uid 89); 4 Aug 2016 05:14:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=rclass, lately, addr_mask, Meissner X-HELO: mail-pa0-f68.google.com Received: from mail-pa0-f68.google.com (HELO mail-pa0-f68.google.com) (209.85.220.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 04 Aug 2016 05:14:42 +0000 Received: by mail-pa0-f68.google.com with SMTP id hh10so15823495pac.1 for ; Wed, 03 Aug 2016 22:14:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vgT8VsK4MPA75TJ7yNNUYaK3mO1YtIMtny8pCaB+/Ns=; b=hCsrybE/XOH3kDvxoij5/MkgCWijeH6ehtEHaby1kzF/GGODFCY5vaLPqwyy4/aYgO 9a3slQuPatwM3+9qC+hdLHmcaraDiCHlnYKyvGIEzYUWc4QCOBTDSy+r88aGNKrbhLKn U7118RZwS+M+TTzJ8ntRkyissM8juTFw5pUSOXima6oQd0z6IH6StqzlN5m3hZQztTb5 wqLOX3b10i73iO6RSmDUNJn/O9dUaSugW9hMa/pD0GMzEccXH+xkal/F1IVhhc9DBRhQ s40ZOj6w8ARNRPKiD+eu/ctve2t6jNAdg7wXnb1gMTfq9A2Ws3Yya6Fs60ZxMrENaI3Y yBtA== X-Gm-Message-State: AEkoouvAkvyBtC0j/yo/WGwQD+uK7CWK95dNIjRoenGQUL++YPT9gyzQJKChFEhLOcFIRA== X-Received: by 10.66.43.234 with SMTP id z10mr121882336pal.137.1470287680419; Wed, 03 Aug 2016 22:14:40 -0700 (PDT) Received: from bubble.grove.modra.org (CPE-58-160-146-233.sa.bigpond.net.au. [58.160.146.233]) by smtp.gmail.com with ESMTPSA id os8sm1155361pab.6.2016.08.03.22.14.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Aug 2016 22:14:39 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id DA642C17FD; Thu, 4 Aug 2016 14:44:34 +0930 (ACST) Date: Thu, 4 Aug 2016 14:44:34 +0930 From: Alan Modra To: gcc-patches@gcc.gnu.org, Segher Boessenkool Cc: Michael Meissner Subject: [RS6000] rs6000_preferred_reload_class Message-ID: <20160804051434.GK20904@bubble.grove.modra.org> References: <20160731233042.GA20904@bubble.grove.modra.org> <20160803193052.GA13392@ibm-tiger.the-meissners.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160803193052.GA13392@ibm-tiger.the-meissners.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes On Wed, Aug 03, 2016 at 03:30:53PM -0400, Michael Meissner wrote: > On Mon, Aug 01, 2016 at 09:00:43AM +0930, Alan Modra wrote: > > Hi Mike, > > I've been looking at a lot of reload/lra code lately in trying to fix > > pr71680, and noticed a change to rs6000_preferred_reload_class. > > > > In https://gcc.gnu.org/ml/gcc-patches/2016-05/msg00134.html you made > > preferred_reload_class pick a register class when given NO_REGS as an > > argument. That seems odd to me given the usual behaviour of > > preferred_reload_class is to restrict reg classes. Did you mean to > > make that change? I'm wondering whether something you were playing > > with escaped upstream, because there is no ChangeLog for it as far as > > I can see.. > > I was playing with that, but given the patch was meant to be complex only, I > suspect we should try taking it out now, and see if it affects anything. Now bootstrapped and regression tested powerpc64le-linux and powerpc64-linux. OK to apply? * config/rs6000/rs6000.c (rs6000_preferred_reload_class): Delete code accidentally committed 2016-05-02 providing class when given NO_REGS. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 5a9ddd9..b923cfb 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -20441,25 +20441,6 @@ rs6000_preferred_reload_class (rtx x, enum reg_class rclass) return NO_REGS; } - /* If we haven't picked a register class, and the type is a vector or - floating point type, prefer to use the VSX, FPR, or Altivec register - classes. */ - if (rclass == NO_REGS) - { - if (TARGET_VSX && VECTOR_MEM_VSX_OR_P8_VECTOR_P (mode)) - return VSX_REGS; - - if (TARGET_ALTIVEC && VECTOR_MEM_ALTIVEC_P (mode)) - return ALTIVEC_REGS; - - if (DECIMAL_FLOAT_MODE_P (mode)) - return TARGET_DFP ? FLOAT_REGS : NO_REGS; - - if (TARGET_FPRS && TARGET_HARD_FLOAT && FLOAT_MODE_P (mode) - && (reg_addr[mode].addr_mask[RELOAD_REG_FPR] & RELOAD_REG_VALID) != 0) - return FLOAT_REGS; - } - if (GET_MODE_CLASS (mode) == MODE_INT && rclass == NON_SPECIAL_REGS) return GENERAL_REGS;