From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by sourceware.org (Postfix) with ESMTPS id D0DF0384A86E; Fri, 19 May 2023 21:31:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D0DF0384A86E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-64d15660784so1833828b3a.0; Fri, 19 May 2023 14:31:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1684531906; x=1687123906; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=hijajNW3u3XCvL3RViHbOhG8dDcMCETLDFwhI1TBoIc=; b=XwBnopvZppIe8Z39GyThYNCshegK0LETZZo2HVQNOLAX6GWddILUEg3ERyh3c75q7m ZtcG33WryyuGJvhreOrEnvomsR9uGWKUflT/yftvzBXMRyq1Jm6B8LdxisiTkCCaGL90 cDK1YHdF4lgeERF+cdWwVDNCVtihbQk3/YI5UL5kZiAe4a+e2CqJSR0/Y9NttVUF/uS5 GcKMj2mOdbiaSaZHXSpJNU1AmoSaIZOyiBxKQTOmnwP8b2WFLG+bIt/EXJ0K1f63XgIF c5lnozIOiP0PnRFw0YRPRDN+dFtScwvaLCP7l5Y/MieyY02ud+8SVDCNqzrm83BvJPMP hN/w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684531906; x=1687123906; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hijajNW3u3XCvL3RViHbOhG8dDcMCETLDFwhI1TBoIc=; b=dq8Frs0iHRdwnGE5vkLAuEDFxRyHLqCZcCKW8DONfRbSRdrgPSkHasieWRACUXDFwZ y0823vOnjkfzL4s0lXCDSoj+v36VURf77yPu421edp2gBxLpaqVx7PcH1Y1cveRMQ3AT Yqg5TLDCNzVlLyLWnat0+R6hh1BHDNPTTz/5VXHIjkLUEmWLw91I6Gzu63SdN3xLu10p VXCYU58cEinq1q+gOfOFrx7/OlTY5/y/eGsDJ80eDmTQzkR4/g5KW5t4hxVx75y7TnOL w1Hx7OTrYGnmHzz5KUPiaqwwKhDjP7Q6bejOpu90JDu66T3T0prOtW2n3maYfwNKYFNQ jtWA== X-Gm-Message-State: AC+VfDw7WFqKlSoIyrEaoWKxPIEZwWExHis6PvuyxSiydWTGYTPn43uN XS/p1arV7A3odoK8p5NkJYqA4DiHAGM= X-Google-Smtp-Source: ACHHUZ78S2tTcp2vHnlBkuDoPyO7KY0xufrH8Gh8YCqVsTjmTqS9moX026CLsO39UbE5Z9p6HwqhRw== X-Received: by 2002:a05:6a20:158d:b0:101:1d1d:4396 with SMTP id h13-20020a056a20158d00b001011d1d4396mr3637373pzj.2.1684531905752; Fri, 19 May 2023 14:31:45 -0700 (PDT) Received: from ?IPV6:2601:681:8d00:265::f0a? ([2601:681:8d00:265::f0a]) by smtp.gmail.com with ESMTPSA id m12-20020a17090a34cc00b0025356cce0e4sm105044pjf.24.2023.05.19.14.31.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 19 May 2023 14:31:45 -0700 (PDT) Message-ID: <37637566-5943-fe3d-3741-b246ec954b23@gmail.com> Date: Fri, 19 May 2023 15:31:44 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.1 Subject: Re: [PATCH] Only use NO_REGS in cost calculation when !hard_regno_mode_ok for GENERAL_REGS and mode. Content-Language: en-US To: liuhongt , gcc-patches@gcc.gnu.org Cc: vmakarov@redhat.com, linkw@gcc.gnu.org, segher@kernel.crashing.org References: <20230517065702.2935000-1-hongtao.liu@intel.com> From: Jeff Law In-Reply-To: <20230517065702.2935000-1-hongtao.liu@intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 5/17/23 00:57, liuhongt via Gcc-patches wrote: > r14-172-g0368d169492017 replaces GENERAL_REGS with NO_REGS in cost > calculation when the preferred register class are not known yet. > It regressed powerpc PR109610 and PR109858, it looks too aggressive to use > NO_REGS when mode can be allocated with GENERAL_REGS. > The patch takes a step back, still use GENERAL_REGS when > hard_regno_mode_ok for mode and GENERAL_REGS, otherwise uses NO_REGS. > Kewen confirmed the patch fixed PR109858, I vefiried it also fixed PR109610. > > Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. > No big performance impact for SPEC2017 on icelake server. > Ok for trunk? > > gcc/ChangeLog: > > * ira-costs.cc (scan_one_insn): Only use NO_REGS in cost > calculation when !hard_regno_mode_ok for GENERAL_REGS and > mode, otherwise still use GENERAL_REGS. BTW, Vlad is on PTO right now. I'm sure he'll handle this after he returns and starts digging out of all the stuff that's piled up. jeff