From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by sourceware.org (Postfix) with ESMTPS id E41163858C78 for ; Tue, 12 Dec 2023 08:29:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E41163858C78 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E41163858C78 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::133 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702369789; cv=none; b=GYgwdPdYmA4hS1snCBLFAkvc50df45r8RWar8C6Y/5ESAa3veBSEN50OFEXlgf6sTUNqwH3IJPeLywfD+j/cEJdvszdD3KF5UlcNMhGUNo4z7/9BlfAhKuRewa0gcDZwshsZaYB46LkSOGddHvR23TBTpRSPaGbcLNvM2Bp/rSc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702369789; c=relaxed/simple; bh=azkGFj8z43l/MnKhaY6plkoSyO5w6txSksImKTjZiIY=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=HP69wci+rARkZOGB8+UNZbigHY1vGisSgQSwdjd0pg7KCF2fQnwa2Tm6nNltopj2kDT97u2aOU6yGlGoNELWZRpCNYQvChSc5WVzk3F/+PJ4xRog2LgK4Z8KRExNRjL8d7T7HgG7t3CvJUyVg0JY/rWMoAxu+3Ww8hfqkrr1mH8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-50bf1e32571so6336620e87.2 for ; Tue, 12 Dec 2023 00:29:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702369787; x=1702974587; darn=gcc.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=azkGFj8z43l/MnKhaY6plkoSyO5w6txSksImKTjZiIY=; b=HJ0VHrL2t9HOEJE6A5HRaZfkYKyaH0B+lkKnUMR8BOijJcsiQkYExd7C3hyS+zhB43 FLSzCSZnsBGJ4q13G92rvUHFdQkwFTGGyU9p1kXkH/72sC49Wy7DbQUyZASuhhQ3IHCJ SW/SSZweT0yl9VCoI8m0FC8nXk3BL0kv0f3U7czR1F9jgJbmgOr9Kzg0ENAvbPLpbObj LWp2M8Ki6rFFOcyEEHZl8qif8nPDKzbf7d92gNOSgQfSbPdDGLrf4OeO54ajccsPpcXj RVJLyzQQBsbhetR/K/hZOA5UbUfuv6/NXL+Av8SrNKcSv20L3qqcmMpXW7EXeOrKczpd gkCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702369787; x=1702974587; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=azkGFj8z43l/MnKhaY6plkoSyO5w6txSksImKTjZiIY=; b=XR1tvcjLl9Oy3sv/uSGI1A6XunWRH7OScAM46dn3+yqaW/zClx2265OCZbNq9x47tN F/vhhiYxmxuX3iUfuJA9IKyxL0WvXbwkLlU5RfoIgREq73e18kPzeSjheAH748W8D4l9 oNU5OjnHegTgkMKg0+sq9D/LuCmgJ4gus+AVE9RnSe1krAT5EZtqGHL43oRpX6ZutSqt c/OPEd9ZyZHdgY1/ilQzgVfBgSHAaasIh3HgsV0pU21wWJewmNCStlQP5qrqsd9ve/BC 3VWtTcO+d73QAEZA9tIqIP4EI54LJ08BDLrNOn8hrQyuj78unASVv69gmSig383GWFZJ ElJQ== X-Gm-Message-State: AOJu0YzINS2TeY4OxynZdz4JzcAsxaQAruZ5b5fgOQnYPRJkwgh9iqMF gkLTH2TVebEV+tI058vp268XupKtITQJmZ6eV4k= X-Google-Smtp-Source: AGHT+IHuCUxEyk0Zw5lX4D1BarIOC2xMciIuw6qZ7THbpS9Kpg2dfNIOhhF6i50PBV/r7cOdEp2WrPHIhBOcb27xj4c= X-Received: by 2002:a05:6512:39cb:b0:50b:fcd4:8316 with SMTP id k11-20020a05651239cb00b0050bfcd48316mr3578967lfu.100.1702369786425; Tue, 12 Dec 2023 00:29:46 -0800 (PST) MIME-Version: 1.0 References: <20231211113146.f1659950e14a4342b42e1bd6@killthe.net> In-Reply-To: <20231211113146.f1659950e14a4342b42e1bd6@killthe.net> From: Jonathan Wakely Date: Tue, 12 Dec 2023 08:29:19 +0000 Message-ID: Subject: Re: issue: unexpected results in optimizations To: Jingwen Wu Cc: "gcc@gcc.gnu.org" Content-Type: multipart/alternative; boundary="00000000000065768e060c4bda29" X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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: --00000000000065768e060c4bda29 Content-Type: text/plain; charset="UTF-8" Ignore the troll On Mon, 11 Dec 2023, 17:28 Dave Blanchard, wrote: > 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 > --00000000000065768e060c4bda29--