From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 22082385841D; Wed, 24 May 2023 11:48:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22082385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684928939; bh=nmnpKzY6c/IjMLlu9Hfj6YQzb0jzyrjHXxzGwT3eHA4=; h=From:To:Subject:Date:In-Reply-To:References:From; b=E9p2nADUC3l7EUpiUqnQfFTcAEX+0TgvK6ImYZ9OJS61/zINMO5W2oYEXhcBLHtfV zshHyUpcM02/LdslIeaJqywhtlt9rTPNtGdqIA97G4/QKs4TUW7B7ktn7GoSKlfx9o LZGWQ4P8yfDTcZGdn/uqzgpnxgAp9pVpjtt0WQ4o= From: "jakub at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/102989] Implement C2x's n2763 (_BitInt) Date: Wed, 24 May 2023 11:48:56 +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: attachments.isobsolete attachments.created 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 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #55141|0 |1 is obsolete| | --- Comment #43 from Jakub Jelinek --- Created attachment 55148 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D55148&action=3Dedit gcc14-bitint-wip.patch Another update. This version can emit _BitInt(N) values in non-automatic variable initializers, handles passing/returning _BitInt(N) and for N <=3D = 64 (i.e. what fits into a single limb) from what I can see handling it in GIMP= LE passes and and even expansion/RTL seems to work. Now, as discussed earlier, for N > GET_MODE_PRECISION (limb_mode) I think we want to lower it in some pass in between IPA and vectorization. For N which fits into DImode if limb is 32-bit (currently no target does that as we have just x86-64 support) or which fits into TImode for 64-bit if TImode is supported, I guess we want to map arithmetics to TImode arithmetics, for say 2-4x larger emit code for arithmetics (except perhaps multiplication/division) inline as straight line code and for even larger as loops. In the last case, a question is if we could use e.g. TARGET_MEM_REF for the variable offset in those loops on the vars even when they aren't TREE_ADDRESSABLE (but would force them into memory during expansion).=