From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.killthe.net (mail.killthe.net [207.126.114.3]) by sourceware.org (Postfix) with ESMTP id 2ACD13858C56 for ; Mon, 11 Dec 2023 17:28:25 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2ACD13858C56 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=killthe.net Authentication-Results: sourceware.org; spf=none smtp.mailfrom=killthe.net ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2ACD13858C56 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=207.126.114.3 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702315706; cv=none; b=lgclJgd4f6N3vBbIB+nuqqvTEi/tjKtIYB0AZ9krTishOAa3/u/mG3czDKk2ASw4Nk+3ZaBaptLqJbdqf60OTogFYZI6p3kAA07P6lLpan/LMwlrQi4j8pWb9x3rXsXO59afSB5SZYJG9g8GkwBu3vJKJRAg8TVOnHLxa7V8vyU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702315706; c=relaxed/simple; bh=rFebdq/bGpWtly1vdVgvweS14iu3O85/MIOGYYmIjRc=; h=Date:From:To:Subject:Message-Id:Mime-Version; b=q2BHWIa6LBeQvnA8J9NOL2DF/qUrsnQbpm6qQwIivp/F0hKGMi6EsjayzspdV7ZIbUSm6+LD7Nj7ajCQpLb0BTQl94LCaoh02EhEr/il0MB0FedtUl4pqDIsDCo/RtLzYrQEDh4gv2dxmXxVePdlv2w1XaNWIiIx/adoU2vfpW8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from magic (unknown [166.199.184.97]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.killthe.net (Postfix) with ESMTPSA id 5E05F120002; Mon, 11 Dec 2023 12:28:24 -0500 (EST) Date: Mon, 11 Dec 2023 11:31:46 -0600 From: Dave Blanchard To: gcc@gcc.gnu.org Cc: Jingwen Wu Subject: Re: issue: unexpected results in optimizations Message-Id: <20231211113146.f1659950e14a4342b42e1bd6@killthe.net> In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,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: Hi Jingwen, This is the same GCC which in recent versions produces something like two dozen extraneous, useless, no-op instructions when doing a simple 64-bit math operation on 32-bit systems, and does not use SSE properly either. In each major release these problems get worse. The code generator is clearly in a state of slow degradation, starting about GCC version 5 or 6--not coincidentally the same time when the major version numbers started increasingly so rapidly, although it really has been junk since the beginning. Stefan Kanthak hammered this point home numerous times on this list, much to the ire of people like Jonathan Wakely who called him a noob, telling him to "go file a bug" in a filing cabinet in some obscure corner of a disused lavatory so that it can be safely ignored, and so on. It seems that if correct code generation and optimization is important to you (as it should be), GCC is NOT the compiler to be using. I'm all the time discovering new and crazy problems with this convoluted pile of junk. My recent foray into bootstrapping GNAT (ADA) has opened up yet another can of worms. It's broken on GCC 10, and even more broken on GCC 9, and this despite 30+ years of development. Sometimes these days I even blame GCC when it wasn't at fault after all, because it's making itself into more and more of a likely suspect as the years go by. I haven't examined the code output of Clang to see how it compares, but it's worth serious investigation. Dave