From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0DC8E3858CDB; Wed, 8 Nov 2023 01:56:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0DC8E3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1699408580; bh=FPt+GnPsT+7+WrfoWAqtfBgByzXB7NCo+Md5vCfCnoM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=e6NYtw+R4D9ncqM1IxGTIiQzrFB/Y35WfjscUXB8wPVirI9cMzr/VNhiVJSrBV15p skVplNe9VTnO7kuaMxl6T34BObifsdDmaIcxFBZP8N7IdRtd/EEp+ExiNPy5DFPJCA tzhR2ZJDFz+lEZWephJyjvkbkvdGnyM/SN7eAHEE= From: "kito at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/112431] RISC-V GCC-15 feature: Support register overlap on widen RVV instructions Date: Wed, 08 Nov 2023 01:56:19 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: kito 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=3D112431 --- Comment #3 from Kito Cheng --- Share some thought from my end: we've tried at least 3 different approach on LLVM side before, and now we model that as "partial early clobber", we plan= to upstream this on LLVM side but just didn't get high enough priority yet :( What means? Give some practical example to demo the idea: 1. It's normal live range without early clobber vadd x, y z # y and z is dead after this use. |---------------------| | read | y z | | write | x | |---------------------| 2. It's live range with early clobber. vadd x, y z # y and z is dead after this use, and assume x is early clobber. |---------------------| | read | x y z | | write | x | |---------------------| 3. It's live range with partial early clobber. vwadd.vv x, y, z # x is two time larger than y and z So we split x into xh and xl to represent the high part and low part, and assume high part can be overlap with others. |------------------------| | read | xl y z | | write | xh xl | |------------------------| And following case is assume high part can overlap with others: |------------------------| | read | xh y z | | write | xh xl | |------------------------| Then the register allocator should able to did the overlapping allocation naturally IF we build live range.=