From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18609 invoked by alias); 17 Oct 2016 07:59:50 -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 18585 invoked by uid 89); 17 Oct 2016 07:59:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=D*s, Hx-languages-length:1545, opposite, lowered X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Oct 2016 07:59:47 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 8EA1DAD45 for ; Mon, 17 Oct 2016 07:59:45 +0000 (UTC) Date: Mon, 17 Oct 2016 07:59:00 -0000 From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Fix PR77826 In-Reply-To: Message-ID: References: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2016-10/txt/msg01262.txt.bz2 On Sat, 15 Oct 2016, Marc Glisse wrote: > On Thu, 13 Oct 2016, Richard Biener wrote: > > > The patch introduces '@@' captures which do two things - first they > > change the comparison used for matching back to operand_equal_p > > only (thus perform "value-matching"), second the @@ capture denotes > > the specific operand that should be refered to in the result > > section (ifs and result expressions). > > > > When we face (plus @0 @1) (convert? @@0) for example this is lowered > > to (plus @__2 @1) (convert? @__2@0) marking the @__2 match for > > value handling. > > Funny, I had the opposite convention in mind ;-) > > On a completely artificial example: > (minus (plus (plus @0 @@0) @@0) @0) > > would correspond to: > (minus (plus (plus @1 @2) @3) @4) > > where either @1 or @4 is captured as @0, say @1 for example, @4 is compared > strictly to @1, while @2 and @3 are value-compared to @1 (lax). > > This way, when we talk about @0 later in the transformation, we are indeed > talking about the thing that was called @0 in the input pattern, while @@0 is > not-quite-@0. > > But your version should be fine. Yeah, I tried to avoid any ambiguity if @@ is used and didn't like to write (minus (plus (plus @0 @@0) @@0) @@0) (too many @@s). > > I modified the patterns you identified and the ones I did and > > removed the operand_equal_p uses where possible. > > Thanks. (some can be further generalized, as you explained in an earlier > message, but we can do that later as the need arises) Yes. Richard.