From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4C383386183A; Wed, 6 Dec 2023 14:36:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4C383386183A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1701873370; bh=+vkWjIesKjG/qDDmKhEf5G6xGbJEFDKktgP9/mjpGv8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=H2sfZIvQ4hsKvt+RVn0ZrCni+rpe/3/8winroNhURpFGtfiwG02h87z/RSyg2CIx3 u5Z+bDjgH6EogvCad+ScC/59Emioc1plYzxLcVm5ZqWqh0iDxbiomyuwejGpFmlGZf XcDFXedWAvQwuNu4UsPb/EbDcZERXNc7HH9nqGxc= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112855] [14] RISC-V vector: vsetivli clobbers variable value Date: Wed, 06 Dec 2023 14:36:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D112855 --- Comment #2 from GCC Commits --- The master branch has been updated by Pan Li : https://gcc.gnu.org/g:c9d5b46a25547035e381b0246de5cb553ca8b02d commit r14-6222-gc9d5b46a25547035e381b0246de5cb553ca8b02d Author: Juzhe-Zhong Date: Wed Dec 6 22:26:46 2023 +0800 RISC-V: Fix VSETVL PASS bug 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 oper= and 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.=