From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id E90F83870C36 for ; Mon, 20 Nov 2023 08:19:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E90F83870C36 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E90F83870C36 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700468392; cv=none; b=EhQ+deewVci8gHdEQ82yGlLY8vUmjuSzvl8sqerYWRNiyYRsGcLC74Ig0U26Y78ee+QVa/LDkbFp3MJt5In6Td6KgoguqGWxWH+OXJ6gphwj7rW6GodPRwqGNgo+NBsJnd6gqD+ZLx380n5iOR+/ARd9nhGCIr5GTI/9iRJCZW8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700468392; c=relaxed/simple; bh=+eVaCHiXCX/+GKc6w9KEFIbZW+xQ4Qr1OQ15pEWaA8o=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version; b=ZooRX2J+lCNVPuLmQiKtus5p0Fw7LD9ehWlxgABJ58zfXRWibZXTETs6OHNNAQCEma1jrSTTIqmgGfXeVd6g31SpWIeKj8IoOfK4Woy3kGXu28GXTwi+F96rcOElaRiNdiHKUVP+VZIlsbj2lfTrfhNJYvGEFBYQxLQO61b1P7Q= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700468390; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=5bK3Cg3VOMgc5amgIUNmOYUMmaySaikhANXaU8SPM4Q=; b=FG/XCmWmUn3S7YSl2T7eaDMA4GsKLFOD64TtHNN6OQhV0mLn7T57JZWw+2mq6Dn/G32CT9 rOL2CujdlNz/fcLOL24XWTJ211eaN9dEbGTT4yVVtdUJhPxfAxcxDHT+wDm321Mg/dp7d1 vTdDXTOK1Y7H4XrTx7rJdzH/GePhYuY= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-207-q5O9jopjM0mtQx36ydjYkg-1; Mon, 20 Nov 2023 03:19:49 -0500 X-MC-Unique: q5O9jopjM0mtQx36ydjYkg-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AA346185A782; Mon, 20 Nov 2023 08:19:48 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.194.53]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6DEF240C6EB9; Mon, 20 Nov 2023 08:19:48 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 3AK8JjCc1532839 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 20 Nov 2023 09:19:46 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 3AK8JiDC1532838; Mon, 20 Nov 2023 09:19:44 +0100 Date: Mon, 20 Nov 2023 09:19:44 +0100 From: Jakub Jelinek To: Richard Biener Cc: "Joseph S. Myers" , gcc-patches@gcc.gnu.org, Florian Weimer Subject: Re: [PATCH] c-family, middle-end: Add __builtin_c[lt]zg (arg, 0ULL) exception Message-ID: Reply-To: Jakub Jelinek References: MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Nov 20, 2023 at 07:49:40AM +0000, Richard Biener wrote: > Of course the other obvious alternative would be to parse > stdc_leading_zeros and friends directly, and not go through macros > and builtins. The stdc_* names are not keywords and without including stdbit.h I'm not sure it is ok to change their behavior. That said, the last patch in the series implements 3 of the 14 type-generic macros as builtins, so one can then #if __glibc_has_builtin (__builtin_stdc_bit_width) #define stdc_bit_width(value) __builtin_stdc_bit_width (value) #else ... #endif and be done with that. If there is an agreement we should do that for all 14 rather than just those 3 + the 2 ugly hacks (__builtin_c{l,t}zg with 0ULL second argument and __builtin_bit_complement), I can change the patch to implement all 14 too (again, in the FE in the same spot, so there isn't actually any builtins.def for it and it doesn't affect the middle-end at all). Note, __builtin_bit_complement doesn't affect the middle-end at all either. Jakub