From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id 051193858409 for ; Fri, 31 Dec 2021 22:05:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 051193858409 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=deneb.enyo.de Received: from [172.17.203.2] (port=55915 helo=deneb.enyo.de) by albireo.enyo.de ([172.17.140.2]) with esmtps (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) id 1n3Q1S-000SlE-TK; Fri, 31 Dec 2021 22:05:14 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.94.2) (envelope-from ) id 1n3Q1S-000F83-IV; Fri, 31 Dec 2021 23:05:14 +0100 From: Florian Weimer To: Noah Goldstein Cc: "H.J. Lu" , "H.J. Lu via Libc-alpha" , GCC Development , Arjan van de Ven Subject: Re: [PATCH] x86-64: Optimize memset for zeroing References: <20211231182010.107040-1-hjl.tools@gmail.com> <87h7aofqtx.fsf@mid.deneb.enyo.de> <878rw0fpxm.fsf@mid.deneb.enyo.de> Date: Fri, 31 Dec 2021 23:05:14 +0100 In-Reply-To: (Noah Goldstein's message of "Fri, 31 Dec 2021 15:15:57 -0600") Message-ID: <874k6ofn1h.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Dec 2021 22:05:19 -0000 * Noah Goldstein: >> >> bzero does not have the interface ambiguity that bcmp has. So the >> >> only reason for not using it would be namespace cleanliness. >> > >> > bzero isn't a standard C function and it isn't optimized like memset >> > in glibc. > > It could be an issue if the "optimization" was made and then the > binary was run with an older version of GCC that was still using > the aliasing bzero. Would end up being a deoptimization then. That's a fair point.