From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by sourceware.org (Postfix) with ESMTPS id B96E33858D39 for ; Wed, 6 Dec 2023 20:08:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B96E33858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=rivosinc.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B96E33858D39 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::431 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701893298; cv=none; b=UaixlHhvuMc16Qo8FvHaa6KGAwN3FlW9rrOphB/Fuxc8tOXtFszwoQeT4wkGZhQW54elnv9+/gKxElTQdHbnGIZCOP9J9gKecpcAsxOxNaK3nQxoFbUR9OypLZx8jKOw3LzgIDx2Hh2KgRNu0hkQEyWVmSeTHFVtatJ74097sBM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701893298; c=relaxed/simple; bh=GZ+N5l7i6XCZjXk8K6H1qP6u4XoEE+/glXKtuT++fBg=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=giWvzvAuGDSIR0d6LAII0kXUNCcumBHrYtPHrivpzarPZG6aCD4RZznYpaxQZy4YcwQ6DFAnUNQ7I6uJ6NsIiyhzK9nIR2lkf7TtMstFnt3vimOWB2AMEuadGtCq0T6jSb54ql2UDOW0jX7HPHstWEzh6g9fa/ai/OSMs71UMy0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-6cbe716b511so204506b3a.3 for ; Wed, 06 Dec 2023 12:08:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1701893286; x=1702498086; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=d5ktWSudEt1SUplQF+rMfxgg2KWYyiAcFpdy6ntrzR4=; b=Ks/yEvOnMDFkc4Z2L0OpWA2TffSilth6Z0P1prt6Oorb+Rv4891/2opvKw48sxYlyT DdIFgc6xSLEqu5XsV1Lazva6eHmtiDdrVdiY45miFuN6aLguYLVmXAp/KfdyFUuEKZUM LKkrSbmn1BE6ViVXKHyZdzvvWrYB6d3s5i7NQmK23aAu+68TQIbcRH7r2EgCgv+qpBdN A585v9BirzuJKtA0xqWpnqC6GtZtKUdrA2hvMPomAIra+G/0maqC8aA+tI2Pyk5xSQDo KPI9Toz5eaVzqTTcN6QfE5QcoM+WF/u4VEYYe/BNOfKLlchJfkrRwNFwkORujfhKy7f3 FOjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701893286; x=1702498086; 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=d5ktWSudEt1SUplQF+rMfxgg2KWYyiAcFpdy6ntrzR4=; b=wmM2bSaV4rZ1XHxHZTgvtWud3oMtkI2oK0Fk+dL/effSNZgq1j2sZvFXrZKaZTDeV7 EPm/sgLeYjGTOtM4B0maBaXcMTTWLf39He3LUJDO1gLzXdHA4Xbz2VjMvX4UTXLZwTK1 5hk2zb+EWIhgxUO+6ufk8+LMfR/oEMVZQ6XTr9zHyEt1N8E/j26tnaQR4GlVUmJ0xJIG T4kKHbo6buognsOWltGtQCbCvLrjR0VlYUzKuMF4Q8B/FccQH1Ypt+eeuIIg2Xr1nlkF wQmxBuy8Ku/YX2AI8RClD/MHAopgpGqIC0ZbKb4QTfuBXOxaAJJifcnD9hOD4ie9D762 +z6g== X-Gm-Message-State: AOJu0YzBUhuO4R/wx0MOC9hkF9OzJUfVj5hH9jw3hq6ZbaPGmU5GyBWe kBVUt43IjMMdTqvJm4VX4DzQhA== X-Google-Smtp-Source: AGHT+IFxo6Yxd+OCOqYrWporGdgqZiUOoWvDiZzU4FwfUIhFhz2XyMbsl4CXzHS5atGFpdsxzVMkjg== X-Received: by 2002:a05:6a00:1745:b0:6ce:2731:d5c1 with SMTP id j5-20020a056a00174500b006ce2731d5c1mr1488183pfc.50.1701893286494; Wed, 06 Dec 2023 12:08:06 -0800 (PST) Received: from [10.0.17.156] ([12.44.203.122]) by smtp.gmail.com with ESMTPSA id t25-20020a62d159000000b006c0685422e0sm363620pfl.214.2023.12.06.12.08.05 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 06 Dec 2023 12:08:06 -0800 (PST) Message-ID: Date: Wed, 6 Dec 2023 12:08:04 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [Committed V2] RISC-V: Fix VSETVL PASS bug Content-Language: en-US To: Juzhe-Zhong , gcc-patches@gcc.gnu.org References: <20231206142646.3402479-1-juzhe.zhong@rivai.ai> From: Patrick O'Neill In-Reply-To: <20231206142646.3402479-1-juzhe.zhong@rivai.ai> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,KAM_SHORT,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: Hi Juzhe, An assert added in this patch is firing on a testcase on rv64gcv: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112888 Thanks, Patrick On 12/6/23 06:26, Juzhe-Zhong wrote: > As PR112855 mentioned, the VSETVL PASS insert vsetvli in unexpected location. > > Due to 2 reasons: > 1. incorrect transparant computation LCM data. We need to check VL operand defs and uses. > 2. incorrect fusion of unrelated edge which is the edge never reach the vsetvl expression. > > PR target/112855 > > gcc/ChangeLog: > > * config/riscv/riscv-vsetvl.cc (pre_vsetvl::compute_lcm_local_properties): Fix transparant LCM data. > (pre_vsetvl::earliest_fuse_vsetvl_info): Disable earliest fusion for unrelated edge. > > gcc/testsuite/ChangeLog: > > * gcc.target/riscv/rvv/autovec/pr112855.c: New test.