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 [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 5E05E3857C70 for ; Thu, 8 Oct 2020 11:40:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5E05E3857C70 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-334-XHNaWjh_O6KmoLScKdp8Ig-1; Thu, 08 Oct 2020 07:40:41 -0400 X-MC-Unique: XHNaWjh_O6KmoLScKdp8Ig-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3728B1084C8F; Thu, 8 Oct 2020 11:40:40 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-112-37.ams2.redhat.com [10.36.112.37]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C1CAF5D9D5; Thu, 8 Oct 2020 11:40:39 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id 098Beb42018158; Thu, 8 Oct 2020 13:40:37 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id 098Bea5Y018157; Thu, 8 Oct 2020 13:40:36 +0200 Date: Thu, 8 Oct 2020 13:40:36 +0200 From: Jakub Jelinek To: Wilco Dijkstra Cc: GCC Patches Subject: Re: [PATCH] PR target/97312: Tweak gcc.target/aarch64/pr90838.c Message-ID: <20201008114036.GU2176@tucnak> Reply-To: Jakub Jelinek References: <20201008110912.GS2176@tucnak> <20201008112535.GT2176@tucnak> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 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=-6.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_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Oct 2020 11:40:44 -0000 On Thu, Oct 08, 2020 at 11:37:24AM +0000, Wilco Dijkstra via Gcc-patches wrote: > Which optimizations does it enable that aren't possible if the value is defined? See bugzilla. Note other compilers heavily optimize on those builtins undefined at value zero. > > We just should make sure that we optimize code like x ? __builtin_c[lt]z (x) : 32; > > etc. properly (and I believe we do). > > I think we do, but both the external and internal documentation are not clear > enough that most targets actually do define a value and will optimize for it. > Otherwise we wouldn't have this bug now... The documentation is very clear that the builtins are undefined at zero, that is all that matters for users. Jakub