From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ua1-x932.google.com (mail-ua1-x932.google.com [IPv6:2607:f8b0:4864:20::932]) by sourceware.org (Postfix) with ESMTPS id 6FBC73858C53 for ; Thu, 2 Feb 2023 15:19:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6FBC73858C53 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-ua1-x932.google.com with SMTP id x23so438772uau.3 for ; Thu, 02 Feb 2023 07:19:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=OV4/yHPB5buizzH8yLp5ntZWcdCm/PO5PDUrdxfAQgo=; b=eEMNSpDW9Lig3uJbwF/OsmLxdufmwtCz/WGL7eQ/ty+4mlHZ56ndakIr/Dva6RbpyP ck7q8sPsip6how/wUAaMmecOgA0sDDAVbI8OskNbmXq/cBP+KP89ch6vI2RXCT9Y+rZL iERFS5TJB9OfpKfuHjAb1XoIHBof9AOHdj/FjPqmmI0sBD7JHMrX4WpFc7iOWloLzI30 Hr39EfCANj6lE8MaGQ3rnadVsaya3XHzZM16L02uV5HOtRhrOUrO7YxKq/xb0LKoVSDp YruAEzP/Z0ybQeurotmX7HkdrGlqQhQiU2JvxzohMj5Yd2x6JmaR7TpSPYpFtlr+/Aci /AdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OV4/yHPB5buizzH8yLp5ntZWcdCm/PO5PDUrdxfAQgo=; b=UsAuYDxzuRXjPa4zXh9tRUMJBR9TD3Utb/91q+UCXi+djZ3hmxFisUiPMUJ62ZGWZW zqhXfu1swbkaKR9IdCsVnQtpm1qKs1bE47y3piNEF3SA2HQ8t29v4rkwHyzPxVkh0env Q/r5i5tM9obwiLiJY/uKOK8IZX5pgNqazudH/utFqLSVkz7DVNP0T9wPLiG28UUxmx7z Xua/dsVtc9R2LSzkPoKYvthk2MpRfIkk1RJPDu61YUNa18l6J23om+u4CXP0XdDcB9TA v68ZYoYo7cez/0MBA3QO8Jt5ORjNEWDl9y6L2CjpELYq7Nr3sPcmQ/0sCyOKA8xQS5FU Pgag== X-Gm-Message-State: AO0yUKVKxYUsaPZB8lvwH7TR/ofB9rcdx3dq6vpg5wLnEZmJMVm2GjdD 0zk/l5DYDNYRrCBBiKc6T3fMoXrgTNWZC7prpX0= X-Google-Smtp-Source: AK7set/AoHk/kkuY2KhYqsqV5AK8wFX1VAdBam1Dyd5lYgWe9W8Ggl5+TnkA38IzSk573huuWU7V5rrebXuUNlHVct4= X-Received: by 2002:ab0:654a:0:b0:67c:4096:9063 with SMTP id x10-20020ab0654a000000b0067c40969063mr339448uap.17.1675351151384; Thu, 02 Feb 2023 07:19:11 -0800 (PST) MIME-Version: 1.0 References: <2E16F446920AC99F+2023020120563582688674@rivai.ai> <0CEDD257-703F-4ED3-B927-C21279557CE6@gmail.com> In-Reply-To: From: Kito Cheng Date: Thu, 2 Feb 2023 23:18:59 +0800 Message-ID: Subject: Re: [PATCH] CPROP: Allow cprop optimization when the function has a single block To: Jeff Law Cc: "juzhe.zhong@rivai.ai" , rguenther , gcc-patches , "richard.sandiford" , apinski Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: > > Thank you so much. Kito helped me fix it already. > > RVV instruction patterns can have CSE optimizations now. > What was the issue? VL and VTYPE isn't listed in fixed register so CSE feel that isn't cheap (See CHEAP_REGNO in cse.cc), but actually it's kind of mistake sett for VL and VTYPE register to non fixed register, it all managed by vsetvl insertion pass, and won't involved into the register allocation process, so it should be set 1 in FIXED_REGISTERS, then CSE pass is happy to cse that after we fix that :) More story behind that is we were trying to rely on RA to manage VL and VTYPE before, and then...we gave up and decided to manage that by ourselves.