From patchwork Tue Jul 2 23:01:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 1126526 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-504223-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="MmJCDuFT"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45dfr23CQPz9sNf for ; Wed, 3 Jul 2019 09:01:36 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=VxTefxRjHzyrxPfc9fATABZPP0I6Vah+tIDQKyzyC8v/t1SPSe pZC1q7vGvTDF9XYPRGIsZMpp6gKLDu51r40QOe/E1fwFQ595rCWEl2XL8bDgZtW1 6Ru+IKfosgZ+brAP2bxCYl2kz5A9VSXAjXJrP7tvOppW3RJ3bBWw39PlQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=qslNpfEJOmRQNpTjhNrzDaD9Xl8=; b=MmJCDuFT9EJq8oZSoTBk 1aEACfktUnoZmntglrYwlRQhyfEg2llORDsgk0TpiW+M3m8xf5ShpYK86XieN0PE F498T8vptJ9AW70iCWVgx7T4/ceMydMObwGUj+BrwJ+/gCmAfQJAcf1+Ikx2AkHj aZ2egGrXiD6zihrySj0Kksw= Received: (qmail 46627 invoked by alias); 2 Jul 2019 23:01:27 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 46619 invoked by uid 89); 2 Jul 2019 23:01:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= 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; Tue, 02 Jul 2019 23:01:26 +0000 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F406DC04959E for ; Tue, 2 Jul 2019 23:01:24 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-19.rdu2.redhat.com [10.10.112.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5D9445C224 for ; Tue, 2 Jul 2019 23:01:23 +0000 (UTC) To: gcc-patches From: Jeff Law Subject: [committed] Minor testsuite fallout for pr90883.C Openpgp: preference=signencrypt Message-ID: <65b1144e-5834-c4b1-cfe9-46d45ab9ee06@redhat.com> Date: Tue, 2 Jul 2019 17:01:22 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 X-IsSubscribed: yes So a couple of things can come into play that make this test target dependent. First, on some targets we emit a loop to zero the objects. Thankfully we can use -Os which gets us an empty constructor node again. That seems to make several unhappy targets happy again. On i?86 (and perhaps other targets), the redundant store isn't exposed until a late inlining, which means we need to check dse2 rather than dse1 for the message that it deleted a redundant store. Installing on the trunk, Jeff diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 55deef7255d..9bb683facbd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2019-07-02 Jeff Law + + PR tree-optimization/90883 + * g++.dg/tree-ssa/pr90883.c: Add -Os. Check dse2 for the + deleted store on some targets. + 2019-07-02 qing zhao PR preprocessor/90581 diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr90883.C b/gcc/testsuite/g++.dg/tree-ssa/pr90883.C index 005b2103b4b..c5faffa1f32 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/pr90883.C +++ b/gcc/testsuite/g++.dg/tree-ssa/pr90883.C @@ -1,4 +1,4 @@ -// { dg-options "-O2 -fdump-tree-dse1-details -std=c++11" } +// { dg-options "-O2 -Os -fdump-tree-dse-details -std=c++11" } class C @@ -15,5 +15,6 @@ // We want to match enough here to capture that we deleted an empty // constructor store -// { dg-final { scan-tree-dump "Deleted redundant store: .*\.a = {}" "dse1" } } +// { dg-final { scan-tree-dump "Deleted redundant store: .*\.a = {}" "dse1" { target { ! i?86-*-* } } } } +// { dg-final { scan-tree-dump "Deleted redundant store: .*\.a = {}" "dse2" { target i?86-*-* } } }