From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id 98CFC3858D38 for ; Wed, 14 Jun 2023 08:27:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 98CFC3858D38 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-ej1-x62b.google.com with SMTP id a640c23a62f3a-977d0ee1736so66730366b.0 for ; Wed, 14 Jun 2023 01:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686731241; x=1689323241; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:cc:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=TsEQRWFGYxwBUWu1c9U05tAjD/RLJ27f3YYnwLVVfzg=; b=LigJP06kjZrF4/y2tAXT7L6S7HpT80u25K5wmvtK036SSmIagIUZiTfZKuRsfoMpj1 qnjXD+U22sFf8NVQ15iIehdRpXkaTXIoXBVYgda6bK1VwUSB9/djixhavMl8QmllrRez YrtDl8NpXu4fSbDiVw0L5E9brhT91FHqpLG3x5LiplcasQ/n2DmzqlndvyfW44jeB0r1 0A8K3ORlp6XqQzmvHf+bOuzvs5TBPzzc7Y9Iv5k3mgHURDuxol48dvCr7RWJZ+lIHElF 1k4aIw5IN1rCFu4Y2L7OBKyfSUVZQdxoi3Cz4h84y8VRAIaWShb4XzjMEHoW5RvAVqtD w6Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686731241; x=1689323241; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:cc:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=TsEQRWFGYxwBUWu1c9U05tAjD/RLJ27f3YYnwLVVfzg=; b=ci/hSP5n4/i5AC51Nac68S1do52bCkt3r7h0iAkD7blJXAcstm9QiEtI95FuOEeumr aMLvoK6+2HT3/QmuAVUyMSZyHHlOe5m7aajSg0hvyyK71krWmwVgDgnKpHzhTUUJ5HB2 +CWquETYQkfVZyZpNQ2laeNwTxqTIdgaSiE3Kipxi2L/IPKPyb2uKM3tGtSv7rYzYu79 E+G9jinQcLNn7RobVLDxZUbxGBqCKh7dloSNvq6cFDlnxmRQoC+2V/AuL+f260vI3Z9V 14BplP/d/NqpIA70jDqK34DWnn53qkWPoFE5fDtj2POMSe7aXzMKsTHDgok8qnvHL+vd mCTQ== X-Gm-Message-State: AC+VfDygxLt862O/kDBbyFhiGVCPkaTRpKpcnH8t6v+K266oIZqcl15D nlH9rwJf+n5hcRksw6nguOE= X-Google-Smtp-Source: ACHHUZ7FfPzZ6UxnnEHMxqieW45Lk3c/inS1TI8DbIclA4J9Em7sgpGwTWTT0O2gUtGAt9KWtUrBJw== X-Received: by 2002:a17:906:9744:b0:982:82aa:86b1 with SMTP id o4-20020a170906974400b0098282aa86b1mr192179ejy.43.1686731240885; Wed, 14 Jun 2023 01:27:20 -0700 (PDT) Received: from [192.168.1.23] (ip-046-005-130-086.um12.pools.vodafone-ip.de. [46.5.130.86]) by smtp.gmail.com with ESMTPSA id q18-20020a1709066b1200b0096a6be0b66dsm7661243ejr.208.2023.06.14.01.27.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 14 Jun 2023 01:27:20 -0700 (PDT) Message-ID: Date: Wed, 14 Jun 2023 10:27:19 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Cc: rdapp.gcc@gmail.com, juzhe.zhong@rivai.ai, jeffreyalaw@gmail.com, yanzhang.wang@intel.com, kito.cheng@gmail.com Subject: Re: [PATCH v2] RISC-V: Bugfix for vec_init repeating auto vectorization in RV32 Content-Language: en-US To: pan2.li@intel.com, gcc-patches@gcc.gnu.org References: <20230614005859.960040-1-pan2.li@intel.com> <20230614072900.3698145-1-pan2.li@intel.com> From: Robin Dapp In-Reply-To: <20230614072900.3698145-1-pan2.li@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_NUMSUBJECT,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi Pan, > This patch would like to fix one bug exported by RV32 test case > multiple_rgroup_run-2.c. The mask should be restricted by elen in > vector, and the condition between the vmv.s.x and the vmv.v.x should > take inner_bits_size rather than constants. exported -> exposed. How about something like: "When constructing a vector mask from individual elements we wrongly assumed that we can broadcast BITS_PER_WORD (i.e. XLEN). The maximum is actually the vector element length (i.e. ELEN). This patch fixes this."? > + /* We restrict the limit to the elen of RVV. For example: > + -march=zve32*, the ELEN is 32. > + -march=zve64*, the ELEN is 64. > + The related vmv.v.x/vmv.s.x is restricted to ELEN as above, we cannot > + take care of case like below when ELEN=32 > + vsetvil e64,m1 > + vmv.v.x/vmv.s.x > + */ /* Here we construct a mask pattern that will later be broadcast to a vector register. The maximum broadcast size for vmv.v.x/vmv.s.x is determined by the length of a vector element (ELEN) and not by XLEN so make sure we do not exceed it. One example is -march=zve32* which mandates ELEN == 32 but can be combined with -march=rv64 with XLEN == 64. */ Regards Robin