From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 80129 invoked by alias); 10 Oct 2019 17:54:02 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 80121 invoked by uid 89); 10 Oct 2019 17:54:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=switched X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 10 Oct 2019 17:54:01 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2DB7C4E8AC; Thu, 10 Oct 2019 17:54:00 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-90.ams2.redhat.com [10.36.116.90]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 65AF65D71C; Thu, 10 Oct 2019 17:53:58 +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 x9AHrukQ016709; Thu, 10 Oct 2019 19:53:56 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id x9AHrrpX016708; Thu, 10 Oct 2019 19:53:53 +0200 Date: Thu, 10 Oct 2019 17:54:00 -0000 From: Jakub Jelinek To: Paolo Carlini Cc: "gcc-patches@gcc.gnu.org" , Jason Merrill Subject: Re: [C++ Patch] Remove RROTATE_EXPR and LROTATE_EXPR handling Message-ID: <20191010175353.GP15914@tucnak> Reply-To: Jakub Jelinek References: <6e15b734-8836-07e3-ce58-2b10086a41f7@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6e15b734-8836-07e3-ce58-2b10086a41f7@oracle.com> User-Agent: Mutt/1.11.3 (2019-02-01) X-IsSubscribed: yes X-SW-Source: 2019-10/txt/msg00744.txt.bz2 On Thu, Oct 10, 2019 at 06:12:02PM +0200, Paolo Carlini wrote: > while working on cp_build_binary_op I noticed that the testsuite wasn't > exercising the warnings in case RROTATE_EXPR / LROTATE_EXPR, even more the > code handling those tree codes seemed completely unused. Turned out that the > C front-end doesn't handle those tree codes at all: I'm coming to the > conclusion that the C++ front-end bits too are now obsolete and may be > removed, because only the middle-end generates those codes in order to > implement optimizations. Anything I'm missing? Any additional testing? I guess it depends on where. fold_binary_loc certainly has code to create {L,R}ROTATE_EXPR, just look at unsigned foo (unsigned x) { return (x << 3) + (x >> (__SIZEOF_INT__ * __CHAR_BIT__ - 3)); } unsigned bar (unsigned x, unsigned y) { return (x << y) | (x >> (__SIZEOF_INT__ * __CHAR_BIT__ - y)); } and the *.original dump. The cp_build_binary_op case is unlikely to ever trigger, unless we'd rerun it on cp_folded trees. cxx_eval_constant_expression is unlikely, because recently we've switched to performing constexpr evaluation on pre-cp_folded bodies, not sure if we never encounter folded trees though. cp_fold itself depends on whether we ever reprocess the already folded trees, I'd be afraid we could. pt.c again unlikely, we should be cp_folding only later on. Jakub