From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 0876B3858D32 for ; Thu, 25 May 2023 14:29:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0876B3858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685024990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t+31r8LP1Hw3pnM36k4huLb/pzwknDSOcveByXL6cDc=; b=hB+lUjTCXojLCiQKdmKHjy0BIPL1/EfFJM73FZrH2woFz2TC0LBT6LLoHOnnh/lEie0/VY yk3XzLfDG8qK/cDliukXgquHGkxFbe/EBMQjoJfSLO+Ei1eF497CXPC2777kXk5vDw+bvq vn3VC5PlGcrflW1zUcs+JFo2a1ExDhw= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-627-GVVjIZufNamJ8PdVI-h3iA-1; Thu, 25 May 2023 10:29:49 -0400 X-MC-Unique: GVVjIZufNamJ8PdVI-h3iA-1 Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-62397e86e32so18595456d6.0 for ; Thu, 25 May 2023 07:29:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685024989; x=1687616989; 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=t+31r8LP1Hw3pnM36k4huLb/pzwknDSOcveByXL6cDc=; b=WPk+0O2HHts9NpB/z4+VF4ofQmWnns/KBV51hrHnhDFt6cO81jdI/Nt3OGhpgvdeem hRBellSaxk0JlWaJN4jFdliSe2SZG8YJWeCDuE3K+2FsY4oxXmJzXHNF7dmCT0ogup6D //Qjj5E5Kb+PFmdrMW6auasiDDTkee1VwNusfHHs7z4q/RgAtDm1WcicL3WS72ZmjhQu iRrVtSJRZ/aSZVzBo06oXHb/oH0QSCZrj+XubVTXld9hucaaBviRs0rl8CTX+1RA15tU 7GY6hfXSOZzolMURA4oHQN2CrY5aa5TsZShCfmdfdPoWPFOWIh7PODObsv7wfNDz5wtB KxBQ== X-Gm-Message-State: AC+VfDwp9oVtPAE2q9r8DGBfSHfpERyE20tSJl4kOsCs0fyb5olOFZYa l7WSG3AoqKHu6Ri8hPKh90xmvEWWgEtnPHJnGSMnxBu52/hSc2WM7sv+lhAvVto6ZqXwyi/OhD4 TsqK1xjOTb6/IdlQyeg== X-Received: by 2002:ad4:5bc6:0:b0:625:8cc3:4705 with SMTP id t6-20020ad45bc6000000b006258cc34705mr1483885qvt.33.1685024988889; Thu, 25 May 2023 07:29:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4tAZzdyVEOPOPBqaZquMJ/rq676qdswaPDNTHmLRCK/JxUNVpBezCGBMYqQhCWVCdpnBcUeg== X-Received: by 2002:ad4:5bc6:0:b0:625:8cc3:4705 with SMTP id t6-20020ad45bc6000000b006258cc34705mr1483857qvt.33.1685024988599; Thu, 25 May 2023 07:29:48 -0700 (PDT) Received: from [192.168.1.88] (192-0-143-139.cpe.teksavvy.com. [192.0.143.139]) by smtp.gmail.com with ESMTPSA id z18-20020ad44152000000b005ef42af7eb7sm443066qvp.25.2023.05.25.07.29.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 25 May 2023 07:29:48 -0700 (PDT) Message-ID: <611d2da4-c692-39bb-8042-4415e7b6a194@redhat.com> Date: Thu, 25 May 2023 10:29:47 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] Only use NO_REGS in cost calculation when !hard_regno_mode_ok for GENERAL_REGS and mode. To: liuhongt , gcc-patches@gcc.gnu.org Cc: linkw@gcc.gnu.org, segher@kernel.crashing.org References: <20230517065702.2935000-1-hongtao.liu@intel.com> From: Vladimir Makarov In-Reply-To: <20230517065702.2935000-1-hongtao.liu@intel.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE,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 02:57, liuhongt 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. Thank you for the patch.  It looks good for me.  It is ok to commit it into the trunk.