From patchwork Wed Mar 18 22:09:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2 via Gcc-patches" X-Patchwork-Id: 1257806 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=JYmR74tI; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48jPN2096pz9sPF for ; Thu, 19 Mar 2020 09:09:37 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8A7423959C83; Wed, 18 Mar 2020 22:09:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8A7423959C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1584569375; bh=+IssxK60s6suqNBCBwpw2yeTi6MkMIDjx81GMPiC45k=; h=Subject:To:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=JYmR74tIg4tsbmCMs53uafMeljpyjJ7GjnjOTil2D2i6qXUnCoWOYWMT8HvV4kb+a T+ueCHriXLHEozHzil04M/6A7J2li733CarwzYyFQt6j7iPhMJWsMObXave4h6+/v6 8PIUBsMaRRKqUIOMzQ2bSjfyCZsDH24mSKbpR1EA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by sourceware.org (Postfix) with ESMTP id 0494C394881E for ; Wed, 18 Mar 2020 22:09:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0494C394881E 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-396-Mba5Qn2ROH-z7Q3Cv1ITKQ-1; Wed, 18 Mar 2020 18:09:19 -0400 X-MC-Unique: Mba5Qn2ROH-z7Q3Cv1ITKQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6BBA7800D5F for ; Wed, 18 Mar 2020 22:09:18 +0000 (UTC) Received: from ovpn-114-136.phx2.redhat.com (ovpn-114-136.phx2.redhat.com [10.3.114.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id 405F3BBBC5 for ; Wed, 18 Mar 2020 22:09:18 +0000 (UTC) Message-ID: <9d2d2bfa3d7b7a804462a8e3747ff46ef980a60a.camel@redhat.com> Subject: [committed] [PR rtl/90275] Complete recent change To: gcc-patches List Date: Wed, 18 Mar 2020 16:09:17 -0600 Organization: Red Hat User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-25.2 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS 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-Patchwork-Original-From: Jeff Law via Gcc-patches From: "Li, Pan2 via Gcc-patches" Reply-To: law@redhat.com Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" So I must have botched this when I hand-applied Richard's patch and use that to generate a new one (I went back to his original and verified he got it right). We had a test like && MEM_P (whatever) ANd wanted to include regs ie && (MEM_P (whatever) || REG_P (whatever)) I added the latter, but didn't remove the former. As a result the testcase still failed. This applies the obvious bit to remove the && MEM_P (whatever) line. You could legitimately ask why the tester didn't flag the failure. The tester only looks for regressions. A new test that fails is ignored. I'd like to change that one day, but for now that's where we are to avoid excessive noise. Anyway, I put the attached patch into my tester last week. And: http://gcc.gnu.org/jenkins/job/arm-linux-gnueabi/962/console Tests that now work, but didn't before (1 tests): gcc.c-torture/compile/pr90275.c -O3 -g (test for excess errors) Committing to the trunk as obvious. Jeff commit 529ea7d9596b26ba103578eeab448e9862a2d2c5 Author: Jeff Law Date: Wed Mar 18 16:07:28 2020 -0600 Complete change to resolve pr90275. PR rtl-optimization/90275 * cse.c (cse_insn): Delete no-op register moves too. diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8694f272a9c..3a2e491113e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2020-03-12 Richard Sandiford + + PR rtl-optimization/90275 + * cse.c (cse_insn): Delete no-op register moves too. + 2020-03-18 Martin Sebor PR ipa/92799 diff --git a/gcc/cse.c b/gcc/cse.c index 08984c17040..3e8724b3fed 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -5329,7 +5329,6 @@ cse_insn (rtx_insn *insn) else if (n_sets == 1 && !CALL_P (insn) && (MEM_P (trial) || REG_P (trial)) - && MEM_P (dest) && rtx_equal_p (trial, dest) && !side_effects_p (dest) && (cfun->can_delete_dead_exceptions