From patchwork Thu Oct 16 20:38:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Pop X-Patchwork-Id: 400375 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 A8AB214007F for ; Fri, 17 Oct 2014 07:39:06 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=s8R7s2WpV6rY0cScL WrhJxxpQfL3wmqUvRXntChztdJFoZZ11G2sebUwsqrjUlbpmhDS7BSRmj5LYL+zI MGdpXy2TQX27yl9Tmh8LERhs/YZsx2W3J0VLLt7SKk0P2B2Is9TEAmGI88/eq7gB /1gPjTDg6A6HlFBAZ68mLf85aA= 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:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=OHCItCGzBZFdT1vnRY7M8Rr wh0Y=; b=xV4C60nadb8la3vDPK/+7/7Uhv6Z7sojGLE3bv87Zd7NXKPrRAtFcVY KXi3121pkgn0mgpzxLDpdYv4amZmc6KM3F5c1mCiMgLMX+N1ZrXEG7evNxfUtigL kPOjgWvrATxpxUP98O+XJz0LTGfx685phHllgh7/Ho5vWjHxn/w8= Received: (qmail 20310 invoked by alias); 16 Oct 2014 20:38:58 -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 20298 invoked by uid 89); 16 Oct 2014 20:38:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f173.google.com Received: from mail-ig0-f173.google.com (HELO mail-ig0-f173.google.com) (209.85.213.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 16 Oct 2014 20:38:56 +0000 Received: by mail-ig0-f173.google.com with SMTP id h18so396091igc.0 for ; Thu, 16 Oct 2014 13:38:54 -0700 (PDT) X-Received: by 10.50.25.7 with SMTP id y7mr7867412igf.20.1413491934753; Thu, 16 Oct 2014 13:38:54 -0700 (PDT) Received: from f1.c.bardezibar.internal (81.37.148.146.bc.googleusercontent.com. [146.148.37.81]) by mx.google.com with ESMTPSA id o70sm3608285ioe.25.2014.10.16.13.38.53 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Thu, 16 Oct 2014 13:38:53 -0700 (PDT) Date: Thu, 16 Oct 2014 20:38:52 +0000 From: Sebastian Pop To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH][0/n] Merge from match-and-simplify Message-ID: <20141016203852.GB29134@f1.c.bardezibar.internal> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Richard Biener wrote: > > I have posted 5 patches as part of a larger series to merge > (parts) from the match-and-simplify branch. While I think > there was overall consensus that the idea behind the project > is sound there are technical questions left for how the > thing should look in the end. I've raised them in 3/n > which is the only patch of the series that contains any > patterns sofar. > > To re-iterate here (as I expect most people will only look > at [0/n] patches ;)), the question is whether we are fine > with making fold-const (thus fold_{unary,binary,ternary}) > not handle some cases it handles currently. I have tested on aarch64 all the code in the match-and-simplify against trunk as of the last merge at r216315: 2014-10-16 Richard Biener Merge from trunk r216235 through r216315. Overall, I see a lot of perf regressions (about 2/3 of the tests) than improvements (1/3 of the tests). I will try to reduce tests. For instance, saxpy regresses at -O3 on aarch64: void saxpy(double* x, double* y, double* z) { int i=0; for (i = 0 ; i < ARRAY_SIZE; i++) { z[i] = x[i] + scalar*y[i]; } } $ diff -u base.s mas.s Thanks, Sebastian --- base.s 2014-10-16 15:30:15.351430000 -0500 +++ mas.s 2014-10-16 15:30:16.183035000 -0500 @@ -2,12 +2,14 @@ add x1, x2, 800 ldr q0, [x0, x2] add x3, x2, 1600 + cmp x0, 784 ldr q1, [x0, x1] + add x1, x0, 16 fmla v0.2d, v1.2d, v2.2d str q0, [x0, x3] - add x0, x0, 16 - cmp x0, 800 + mov x0, x1 bne .L140 .LBE179: - subs w4, w4, #1 + cmp w4, 1 + sub w4, w4, #1 bne .L139