From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80208 invoked by alias); 30 Aug 2019 07:42:21 -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 79394 invoked by uid 89); 30 Aug 2019 07:42:21 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-io1-f68.google.com Received: from mail-io1-f68.google.com (HELO mail-io1-f68.google.com) (209.85.166.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Aug 2019 07:42:19 +0000 Received: by mail-io1-f68.google.com with SMTP id o9so12219617iom.3 for ; Fri, 30 Aug 2019 00:42:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=oSWyx0q0Ql53tGH9pM5yGu2jsnSoc+mEWSzhS7LF3Uo=; b=mhsJkRfDoyGGf3ZgsulsZbisXNB9yz7eZCQ5amOYxZnduT1Umt7qlvoY/4HeLbhstQ 3BBzqrbMx/6qmGir412pWjBOOSimq4MnS9+8M56o5qDAWZewJjsJkl2+AZCeg7aJkiIA J3AmgQgcjWQswUdQMWD8ixBWOQ6B0vGgQ4TV9B6ZJYYjDfGUxbC8jq5e288sDgiQgaLy 1f5AJ/KHZN7fU/o7rjRfuvm7mUlcclx1F2rrctPFEmIo8lN2adGbltuNVxMC02H7TBBI SXRd2sNi+685uusZzuRIhsjl2OhQLi5rbT4StWpPHccXaRrtX3KoRnWZcaBc5tDO8S58 imcg== MIME-Version: 1.0 References: In-Reply-To: From: Uros Bizjak Date: Fri, 30 Aug 2019 08:29:00 -0000 Message-ID: Subject: Re: [PATCH, i386]: Do not limit the cost of moves to/from XMM register to minimum 8. To: Richard Biener Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-SW-Source: 2019-08/txt/msg02039.txt.bz2 On Fri, Aug 30, 2019 at 9:22 AM Richard Biener wrote: > > On Thu, Aug 29, 2019 at 9:54 AM Uros Bizjak wrote: > > > > On Wed, Aug 28, 2019 at 5:12 PM Uros Bizjak wrote: > > > > > > Attached patch improves costing for STV shifts and corrects reject > > > condition for out of range shift count operands. > > > > > > 2019-08-28 Uro=C5=A1 Bizjak > > > > > > * config/i386/i386-features.c > > > (general_scalar_chain::compute_convert_gain): > > > Correct cost for double-word shifts. > > > (general_scalar_to_vector_candidate_p): Reject count operands > > > greater or equal to mode bitsize. > > > > > > Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}. > > > > > > Committed to mainline SVN. > > > > Ouch... I mixed up patches and actually committed the patch that > > removes maximum from cost of sse<->int moves. > > > > I can leave the patch for a day, so we can see the effects of the cost > > change, and if the patch creates problems, I'll revert it. > > Regresses gromacs and namd quite a bit on Haswell, also perl in SPEC 2000. > I guess we should try understand why rather than reverting immediately > (I'd leave it in at least another few days to get more testers pick up the > rev.). The correct patch is actually [1] (I have updated the subject): 2019-08-28 Uro=C5=A1 Bizjak * config/i386/i386.c (ix86_register_move_cost): Do not limit the cost of moves to/from XMM register to minimum 8. There is no technical reason to limit the costs to minimum 8 anymore, and several targets (e.g skylake) also claim that moves between SSE and general regs are as cheap as moves between general regs. However, these values were never benchmarked properly due to the mentioned limitation and apparently cause some unwanted secondary effects (lowering the clock). I agree with your proposal to leave the change in the tree some more time. At the end, we could raise the costs for all targets to 8 to effectively revert to the previous state. [1] https://gcc.gnu.org/ml/gcc-patches/2019-08/msg02009.html Uros.