From patchwork Thu Jan 28 00:14:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Edelsohn X-Patchwork-Id: 574489 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 A4F381402EC for ; Thu, 28 Jan 2016 11:15:15 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=WbRVEQoG; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=XakxyFRq8spmWSDmqN P8K7CR5310msEilIteSdZ2w8Mu2ffHJNQ89BAsolwQ4auAW7nn5QtfkpMdQ0pPCw L9WV2+geKng9lpW1p1RNHV3mLxUv+6PaEJsznsFv2XLyATrGOsaQPV2ehTfsXSRH rdhgDYaigtMnojJmi6ag9da0o= 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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=B5SCvFmCEdr9hfg4JC+a95Sa J8U=; b=WbRVEQoGkyVow3b0RqFdAmxAuv8NItP4rQjUoVsMoHjYnDHSZQqJbpui 8UDa7Y2nKObKi6R01AeBFBqF6gadIqNooNgGbXY18BIzWvoPXsKRtgTKdgYxQFPz wVexq4oFAOpfb3uvKUwRs6UsVXSAQFU9Ie8RX0qgAPL/HbyLhRI= Received: (qmail 46059 invoked by alias); 28 Jan 2016 00:15:04 -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 46019 invoked by uid 89); 28 Jan 2016 00:15:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=no version=3.3.2 spammy=09_, 0-9_, Removing, 15, 5 X-HELO: mail-lb0-f193.google.com Received: from mail-lb0-f193.google.com (HELO mail-lb0-f193.google.com) (209.85.217.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 28 Jan 2016 00:15:02 +0000 Received: by mail-lb0-f193.google.com with SMTP id oe3so1058419lbb.1 for ; Wed, 27 Jan 2016 16:15:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=YNJZrMdvnaxJUuQed2I1Ohamg+SckdnPCk6TK53tly4=; b=XnvC+OCNwIBl/erq/zvTMvwMxIlFolGWtshAI8XHsDMOYZzffPYXfgljweE/1Kq69/ TvKFc0L1UT8ez3jEPxfPnGEtaeJdGhTojaVPk2UOo+Ybtmb0IuOYU3Bfo404hlPVeFMc tc7B9eOzhSArdbZtDTU4mjmw1vyar/TmngaDtKJWAGaXf4cSRqrgW98gXWaRl66OFX3n cs93b7n4oSk4GVk/VW8XSTYMvURo45LPhJdW68/91lrPWwprZIAfiWunlugI3v+MICWf LA04kwyIMxy8UQVsenClU6dKVHuflW48yy9TiWCeHhzday09SPz2rwH9XwyWlQr94uge v/gg== X-Gm-Message-State: AG10YOS27NKuGES2HVfs1FLhgoaY10ZMBjVLyHsgmPqTe1fzU0VxMQzGbU95YIKOZIubhfEhJsh11riQCNclCQ== MIME-Version: 1.0 X-Received: by 10.112.198.102 with SMTP id jb6mr33121lbc.44.1453940099099; Wed, 27 Jan 2016 16:14:59 -0800 (PST) Received: by 10.114.80.200 with HTTP; Wed, 27 Jan 2016 16:14:59 -0800 (PST) In-Reply-To: <56A95464.3080202@redhat.com> References: <56A95464.3080202@redhat.com> Date: Wed, 27 Jan 2016 19:14:59 -0500 Message-ID: Subject: Re: [PATCH 1/4] Make SRA scalarize constant-pool loads From: David Edelsohn To: Jeff Law Cc: Alan Lawrence , GCC Patches On Wed, Jan 27, 2016 at 6:36 PM, Jeff Law wrote: > On 01/27/2016 12:39 PM, David Edelsohn wrote: >> >> The new sra-17.c and sra-18.c tests fail on AIX because the regex is >> too restrictive -- AIX labels don't have exactly the same format. On >> AIX, the labels in the dumps look like "LC..0" instead of ".LC0". >> >> This patch adds "*" and ".*" so that the "." prepended to LC is >> optional and to allow characters between the "LC" and the "0". >> >> I needed extra escapes for the sra-17.c line that matches multiple >> times - for no apparent reason. > > The joys of expect/tcl. I just keep escaping until the regex that I > developed outside the suite works. I have been trying to get away from > using .* though. The longest match nature sometimes gives surprising > results. In theory .*? ought to work better, but I haven't tried using it > much. > > Anyway, the change looks fine to me. Segher pointed out to me that my revised regex was matching multiple lines, so it was not triggering multiple times without the restriction on the pattern. A revised, tighter patch uses "?" +/* { dg-final { scan-tree-dump-times "Removing load: a = \\\*\\.?LC\\.?\\.?0;" 1 "esra" } } */ +/* { dg-final { scan-tree-dump-times "SR\\.\[0-9_\]+ = \\\*\\.?LC\\.?\\.?0\\.b\\\[0\\\]\\.f\\\[0\\\]\\.x" 1 "esra" } } */ +/* { dg-final { scan-tree-dump-times "SR\\.\[0-9_\]+ = \\\*\\.?LC\\.?\\.?0\\.b\\\[0\\\]\\.f\\\[1\\\]\\.x" 1 "esra" } } */ +/* { dg-final { scan-tree-dump-times "SR\\.\[0-9_\]+ = \\\*\\.?LC\\.?\\.?0\\.b\\\[1\\\]\\.f\\\[0\\\]\\.x" 1 "esra" } } */ +/* { dg-final { scan-tree-dump-times "SR\\.\[0-9_\]+ = \\\*\\.?LC\\.?\\.?0\\.b\\\[1\\\]\\.f\\\[1\\\]\\.x" 1 "esra" } } */ Index: sra-17.c =================================================================== --- sra-17.c (revision 232904) +++ sra-17.c (working copy) @@ -15,5 +15,5 @@ abort (); } -/* { dg-final { scan-tree-dump-times "Removing load: a = \\\*.LC0;" 1 "esra" } } */ -/* { dg-final { scan-tree-dump-times "SR.\[0-9_\]+ = \\\*.LC0\\\[" 4 "esra" } } */ +/* { dg-final { scan-tree-dump-times "Removing load: a = \\\*\\.?LC\\.?\\.?0;" 1 "esra" } } */ +/* { dg-final { scan-tree-dump-times "SR\\.\[0-9_\]+ = \\\*\\.?LC\\.?\\.?0\\\[" 4 "esra" } } */ Index: sra-18.c =================================================================== --- sra-18.c (revision 232904) +++ sra-18.c (working copy) @@ -21,8 +21,8 @@ abort (); } -/* { dg-final { scan-tree-dump-times "Removing load: a = \\\*.LC0;" 1 "esra" } } */ -/* { dg-final { scan-tree-dump-times "SR.\[0-9_\]+ = \\\*.LC0\\.b\\\[0\\\]\\.f\\\[0\\\]\\.x" 1 "esra" } } */ -/* { dg-final { scan-tree-dump-times "SR.\[0-9_\]+ = \\\*.LC0\\.b\\\[0\\\]\\.f\\\[1\\\]\\.x" 1 "esra" } } */ -/* { dg-final { scan-tree-dump-times "SR.\[0-9_\]+ = \\\*.LC0\\.b\\\[1\\\]\\.f\\\[0\\\]\\.x" 1 "esra" } } */ -/* { dg-final { scan-tree-dump-times "SR.\[0-9_\]+ = \\\*.LC0\\.b\\\[1\\\]\\.f\\\[1\\\]\\.x" 1 "esra" } } */