From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94149 invoked by alias); 5 Feb 2020 06:26:18 -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 94141 invoked by uid 89); 5 Feb 2020 06:26:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-8.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=H*f:sk:db7befb, H*i:sk:db7befb X-HELO: us-smtp-delivery-1.mimecast.com Received: from us-smtp-2.mimecast.com (HELO us-smtp-delivery-1.mimecast.com) (207.211.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Feb 2020 06:26:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580883974; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SuHKfdzfYEHUg0uZoNcYrplk/OrhNo5qoJDBWkrCaZ0=; b=ZUJUoSKYxBH+1FtvSGt3Y4gIJSqntI/DIXy6QNBi9mu7E4pN+/e5bG3wcDqth3MwQ6Qeaq RrkUqwJokDWeGXYDljSDfU6og1AYbmFaBqtT1v3gCJlUnf7dy5MjuUlIOT8wg9gER2KPIP 9u7PEDRe8eNgJH7sKRs2u/DvOZNs1bg= 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-413-gxKQElw9N1Gw6jiX2NkTsQ-1; Wed, 05 Feb 2020 01:26:11 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ED6C68018AE; Wed, 5 Feb 2020 06:26:08 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-51.ams2.redhat.com [10.36.116.51]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63E6119756; Wed, 5 Feb 2020 06:26:08 +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 0156Q5tU013682; Wed, 5 Feb 2020 07:26:06 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id 0156Q3xj013681; Wed, 5 Feb 2020 07:26:03 +0100 Date: Wed, 05 Feb 2020 06:26:00 -0000 From: Jakub Jelinek To: Jeff Law Cc: "richard.sandiford" , segher@kernel.crashing.org, gcc-patches List Subject: Re: [RFA] [PR rtl-optimization/90275] Handle nop reg->reg copies in cse Message-ID: <20200205062603.GV17695@tucnak> Reply-To: Jakub Jelinek References: MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00235.txt.bz2 On Tue, Feb 04, 2020 at 06:04:09PM -0700, Jeff Law wrote: > --- a/gcc/cse.c > +++ b/gcc/cse.c > @@ -5572,6 +5572,16 @@ cse_insn (rtx_insn *insn) > sets[i].rtl =3D 0; > } >=20=20 > + /* Similarly for no-op moves. */ > + if (n_sets =3D=3D 1 > + && GET_CODE (src) =3D=3D REG Just nits: REG_P (src) ? > + && src =3D=3D dest) Is pointer comparison ok? I mean, shouldn't we instead do rtx_equal_p (src, dest), set_noop_p (sets[i].rtl) or noop_move_p (insn)? > + * gcc.c-torture/compile/pr90275.c: New test Missing full stop. > +++ b/gcc/testsuite/gcc.c-torture/compile/pr90275.c > @@ -0,0 +1,27 @@ > +a, b, c; int=20 > + > +long long d; > + > +e() { void (unless the ommission of those makes it not reproduce anymore, which I doubt). > + > + char f; > + > + for (;;) { > + > + c =3D a =3D c ? 5 : 0; > + > + if (f) { > + > + b =3D a; > + > + f =3D d; > + > + } > + > + (d || b) < (a > e) ?: (b ? 0 : f) || (d -=3D f); > + > + } > + > +} Jakub