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 2E95A3858D20 for ; Wed, 5 Apr 2023 12:58:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2E95A3858D20 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=1680699530; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WjM5YIXVgVgjjTO0rcK9fY1rQr4+bqKOZPj75++lea8=; b=TcqG1XxDdEOEImRprj4AD5RR1U/ZGuj4OkESpzIZj+dc4KTYUJJ9RpGgkOnN/lCePqTK9I jvWaFIN+8v1mR/BGebvHCZBiFjsdv8TDTGk590BHGRLlwdAujDXEzFJicFf61ZEadXhY5j gW4eO6t9HfLvsBez0BY110ow6Lj44WE= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-161-zO6HqElMOwiamvEcdqt8UQ-1; Wed, 05 Apr 2023 08:58:49 -0400 X-MC-Unique: zO6HqElMOwiamvEcdqt8UQ-1 Received: by mail-qv1-f70.google.com with SMTP id a10-20020a0ccdca000000b005d70160fbb0so16104015qvn.21 for ; Wed, 05 Apr 2023 05:58:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680699529; h=content-transfer-encoding:in-reply-to:from:references: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=WjM5YIXVgVgjjTO0rcK9fY1rQr4+bqKOZPj75++lea8=; b=VN69pYhQAJoUD80B0F1utX3itp+VX0mvdvtFVOTKzHrMKETqsWfLRiaxmjvsX2x6BD SG8l6hclLg1w70BZRFdiUnx6vjdzK/bouB8r8AB2fHKltV9hr9oipN+vAbE3h+YVsYf2 Fwi8MiLcyPE1clYyG0xmHXA+FxwFHD7gTXAC3Hz/zPJQLnLSl0oz4XTx05ZtWNrq6I00 VcK1IYwAeKrYqO+Q3tXjkN75cfbp+pIXe0v4TFgWjecxQDnUcaG9l/r1bCax64/K/AFj x4JxOdpQm1gJ9MET/stbK9oeu0wH8EHi0TSUYYkowCuZSojlb1nvNzO0LqrpUb+0HJhV BLFg== X-Gm-Message-State: AAQBX9cDv9Z0gEpm4EixYD/4y/AQjSnUQDvK/C6+r35k9bPjRSXAEiOD TbgXmhTdkorNgvxr4RzQ5g3vMz0C3bfFJDjQVzjwuHVfqxgSBHeg5tCAsg1G6qy2xW5PTBE4Ih6 rLd5JC/kv3AyQpYlcAA== X-Received: by 2002:ac8:5f53:0:b0:3e4:e58c:d321 with SMTP id y19-20020ac85f53000000b003e4e58cd321mr4419147qta.33.1680699528985; Wed, 05 Apr 2023 05:58:48 -0700 (PDT) X-Google-Smtp-Source: AKy350YSOFa8plcfXMN3UGiMR73D5Kh3V4oI13sFe3oFYX8KP/UP87IOUU7Z62L89LeRaCpXbXH2uw== X-Received: by 2002:ac8:5f53:0:b0:3e4:e58c:d321 with SMTP id y19-20020ac85f53000000b003e4e58cd321mr4419122qta.33.1680699528690; Wed, 05 Apr 2023 05:58:48 -0700 (PDT) Received: from [192.168.1.104] (192-0-143-139.cpe.teksavvy.com. [192.0.143.139]) by smtp.gmail.com with ESMTPSA id t23-20020ac86a17000000b003e63324e123sm3905939qtr.61.2023.04.05.05.58.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Apr 2023 05:58:48 -0700 (PDT) Message-ID: <5c7ec820-944c-3e7e-329c-0617ffbf2bc2@redhat.com> Date: Wed, 5 Apr 2023 08:58:47 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH] Check hard_regno_mode_ok before setting lowest memory move cost for the mode with different reg classes. To: Jeff Law , liuhongt , gcc-patches@gcc.gnu.org References: <20230404051346.1223071-1-hongtao.liu@intel.com> From: Vladimir Makarov In-Reply-To: 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.1 required=5.0 tests=BAYES_00,BODY_8BITS,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP 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 4/4/23 21:29, Jeff Law wrote: > > > On 4/3/23 23:13, liuhongt via Gcc-patches wrote: >> There's a potential performance issue when backend returns some >> unreasonable value for the mode which can be never be allocate with >> reg class. >> >> Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}. >> Ok for trunk(or GCC14 stage1)? >> >> gcc/ChangeLog: >> >>     PR rtl-optimization/109351 >>     * ira.cc (setup_class_subset_and_memory_move_costs): Check >>     hard_regno_mode_ok before setting lowest memory move cost for >>     the mode with different reg classes. > Not a regression *and* changing register allocation.  This seems like > it should defer to gcc-14. > Yes, I am agree.  It should wait for gcc-14, especially when we are close to the release. Also the testing x86-64 is not enough for such changes (although I tried ppc64le and did not find any problem). Cost related patches for RA frequently result in new testsuite failures on some targets.  Even if the change seems obvious and expected to improve the generated code. Target dependent code sometimes defines correctly the costs only for some possible cases and making less dependent from this pitfall is good.  So I think the patch moves us to the right direction. The patch is ok for me to commit it to the trunk after the gcc-13 release and if arm64 testing shows no GCC testsuite regression. Thank you for working on this issue.