From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9E40B3858416; Tue, 6 Jun 2023 07:13:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9E40B3858416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1686035636; bh=UEbPznceNWWkyEBCkBhzNngIXndrc3oN00ptR6QNxQU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xFujRSC1wvUVrJTvqgvn9U+jGIwXwg5BJGKPWCX4EguqKD1pV6RwjdMApqkgu5eoe tX5i5FuCo1j5y+A8Um84lWfkyU+6u7JODg6B7ZBGjSKU/YoVVO8Pbahr9tZMsSfz5L eT2VZdsnYlvA6fURYlVaLFAyl0TvIYEt0lDNQShk= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/102989] Implement C2x's n2763 (_BitInt) Date: Tue, 06 Jun 2023 07:13:54 +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: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW 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=3D102989 --- Comment #63 from Richard Biener --- (In reply to Jakub Jelinek from comment #62) > What the patch including incremental one currently does is: > 1) small _BitInt (on x86-64 N <=3D 64) - the BITINT_TYPEs are kept as is = in > the IL > and expanded, they always have non-BLKmode (QI/HI/SI/DI) and are handl= ed > like any > other INTEGER_TYPEs (except preserved in calls to ensure correct ABI > passing) > 2) middle _BitInt (on x86-64 N <=3D 128) - I keep in the IL just copy > operations and > casts between them and INTEGER_TYPE (TImode in this case), actual > arithmetics is > done on the INTEGER_TYPE > 3) large _BitInt (on x86-64 that will be <=3D 255) - the intent was using > BIT_FIELD_REFs/BIT_INSERT_EXPR to make the IL simple and perform stuff= on > the > up to 4 limbs in this case in straight line code So these large _BitInt already have BLKmode? If so I'd suggest to initially handle them like the huge _BitInt code but "unrolled" and iterate on the code-gen later - I can have a look once one can play with the actual code and testcases. > 4) huge _BitInt (on x86-64 N > 255) use loops, VAR_DECL destination, > VCE+ARRAY_REF > on the sources, > dunno yet if I can get good code by making the VAR_DECL clobbered > immediately after > I load a SSA_NAME from it (whether out of SSA/expansion could then ext= end > the > lifetime of the VAR_DECL, or if I should have some pass do that, or the > bitint pass > figure out the last use and put clobber only after that, or even repla= ce > the SSA_NAME > uses with accesses to VAR_DECL >=20 > Anyway, I think I'll work now on the add/sub with carry now and continue = on > _BitInt only after that.=