From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id 0E0E03858D33 for ; Tue, 21 Nov 2023 00:12:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0E0E03858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0E0E03858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.141.98 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700525545; cv=none; b=eMRhcWrItGDG2xl647uHgsEdpi9gDGA8t01YyFeiMvmfiVdaFewoa9/ZE6KNDTUdW827/YOx/RxCBGZMszF19YE46cZfCQyvcQEZl8naGl+bbRAhGIye4VhBggiRTeTpdsq/Jtr6s6nHv6dvFTwcq+t8+WAM/J+eB/oOxTU66yo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700525545; c=relaxed/simple; bh=qP5DrO0jdQ0PvFmxlaRLdBbqvtq7DHIqVRVyEAgyB90=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=aEzjcA3StspAnJ7g5GGrVwCaoxrzXpD5nCKJDu0Se0pP84vJeb/X31E/SRZi8kEEfEj/vbKG1EyanlIa7keRO88AEnS/qj7eB53HC2uvc+xGbRBYdyD15JGWpx6bZDUdjdfdi4MHbXf24EYKdAHLwY9kzqYLRsB1UK+OKDiJlDU= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: 64jtzJDcQ0mpnwsWYG8Sxw== X-CSE-MsgGUID: lEA7kxyVQz6g/dv5zupa5Q== X-IronPort-AV: E=Sophos;i="6.04,214,1695715200"; d="scan'208";a="26080441" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 20 Nov 2023 16:12:22 -0800 IronPort-SDR: sVIaBsw3R3HwJRFH8W3wW1ihMW6/G/ZfdKR8i4KhcTEU8cr41YaaOjawFumlXPKQC2mj49Z78E ifyMcVLvQIguZwzBUUVpNV9XVy3HtIkN0PJ63vWpTZHruZQyP0615qSeXTP+d6Dc275+nNt2wC mOD5HGNxCLPxsfThRXEN7/xHBfpnLh/o3wq6E9qcrLsnZh83eGs5gWm0na4qGqPqFWAdPWeOrR TWt6+hQeKucpzaSZ0kbHQGeaS6MmAdhk8g0OWPLeQ5fcPe6ZHCYpDoArb6RY2ZXvltLRvDcHYw pYc= Date: Tue, 21 Nov 2023 00:12:18 +0000 From: Joseph Myers To: Jakub Jelinek CC: Richard Biener , , Florian Weimer Subject: Re: [PATCH] c-family, middle-end: Add __builtin_c[lt]zg (arg, 0ULL) exception In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-14.mgc.mentorg.com (139.181.222.14) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3103.2 required=5.0 tests=BAYES_00,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no 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, 20 Nov 2023, Jakub Jelinek wrote: > 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 I tend to agree with the "ugly hack" description of the 0ULL second argument special case. __builtin_bit_complement seems reasonable enough as a primitive for implementing such operations, but so does just defining built-in functions in the front end for all 14 (or for all 14 except those that are trivial wrappers round existing built-in functions without needing to use ({}) or expand argument tokens more than once). -- Joseph S. Myers joseph@codesourcery.com