From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DD1B03858D20; Thu, 28 Sep 2023 07:36:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DD1B03858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1695886586; bh=Rgo8F0eGFIiHelh/2ECa7tI+Z/spwbf+w2QR9cICDK8=; h=From:To:Subject:Date:From; b=iJla2mXGIcXZMWmpdOe7COr37rIfEA1M89AsAQ4fSDTM53zWCSgvvm3X8kzzhbbG3 +SEJWnFPBpfe5iGfjPTjmyIsBXkpX2G66OuXST7Fg3f7TlM8UyhNe5Ch8JiDWeoRyP +ccoH9/XPE1zLLu9XJERFPljFKz0eIFTsRhG5xQE= From: "mumuxi_ll at outlook dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/111621] New: [RISC-V] Bad register allocation in vadd.vi may cause operational error Date: Thu, 28 Sep 2023 07:36:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mumuxi_ll at outlook dot com 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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D111621 Bug ID: 111621 Summary: [RISC-V] Bad register allocation in vadd.vi may cause operational error Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: mumuxi_ll at outlook dot com Target Milestone: --- Hi; My source code can be fond at https://godbolt.org/z/8v9Wxx9Yf. The porblem is that when compiling with -O2/-O3, vadd.vi will allocate a different register for vd compared to vs2, then the actual operation will = only update the first data in vd instead of all. In cases such as -O0, vadd.vi w= ill allocate the same registers to vd and vs2, and all vd values will be refres= hed after execution. Thanks!=