From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0BCAC38558B7; Mon, 5 Jun 2023 07:58:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0BCAC38558B7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685951913; bh=KjbMD86jbwLQGeMgd6Y9BIdU2VFuS2lmK9yeHdxfGtA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=AJBVivJf9I1DvxitpyOjzBoZOFIa0fuZgoAgcquStHwiCK9tHF9oHvwLgN6rIY41p HUUBIsb81jTGhumzicxGXdmaPs7dytsVVefipwas2PApGy2KAT6VlVb6Lfht81NYyR W0CAVikBAh4Pg876aCei5y2rQQnANrOSOkN2iPyY= 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 07:58:31 +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 #60 from Jakub Jelinek --- (In reply to Richard Biener from comment #59) > Oh, so BITINT_TYPE is INTEGRAL_TYPE_P but not INTEGER_TYPE (I think we > don't have any BLKmode integer types?). Yes. Some BITINT_TYPEs have BLKmode. > I think the intent was to > restrict the operation on actual mode entities, BLKmode means memory > where it isn't necessary to restrict things. So you could add > a BLKmode exception here (but then for _BitInt<63> you will likely > get DImode?) Sure, _BitInt<63> has DImode, _BitInt<127> has TImode if it is supported. TYPE_MODE is set according to the rules for structures (so that it would he= lp with function_arg etc. implementation on some targets), so I think say OImo= de for _BitInt<254> isn't impossible. > Can't you use a MEM_REF to extract limb-size INTEGER_TYPE from the > _BitInt<> and then operate on those with BIT_FIELD_REF and BIT_INSERT_EXP= R? > Of course when the whole _BitInt<> is a SSA name MEM_REF won't work > (but when you use ARRAY_REF/VIEW_CONVERT the same holds true) I wanted to avoid forcing the smaller _BitInt results into VAR_DECLs and on= ly do it for the ones where I'd use loops (the huge category). The plan for loops is to do 2 limbs per iteration initially, plus if there = is odd number of limbs or even with partial limb 1-2 limbs done after the loop= .=20 So, the large category where loop isn't used would be up to 3 full limbs or 3 full limbs = + 1 partial.=