From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EA2A3385C6C8; Mon, 5 Jun 2023 08:33:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EA2A3385C6C8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685953990; bh=8CgUooPEeaPAk3/4J0ube+06iyryWY4+cxuPdYBpRpU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TIZ5VFoD8bS+C9ioBN6vsX1ZoGntKrwiYb5UHiiCLdw6UZ1ZjSX6hSg/Du3eveiCe BI5FrQtsUZoS++5FuiI9zhlZyuxcqRXAar7csXAEQWnbe/QM207GePZDLMTWytBra1 Pd/yEVgAOhvBub89TCU6AaFecWY3h4Cii4m3lbO4= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/102989] Implement C2x's n2763 (_BitInt) Date: Mon, 05 Jun 2023 08:33:08 +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: jakub 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 #62 from Jakub Jelinek --- 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 handled 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 opera= tions 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 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 extend 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 replace= the SSA_NAME uses with accesses to VAR_DECL Anyway, I think I'll work now on the add/sub with carry now and continue on _BitInt only after that.=