From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38315 invoked by alias); 30 Apr 2015 16:01:27 -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 38303 invoked by uid 89); 30 Apr 2015 16:01:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 30 Apr 2015 16:01:25 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t3UG1OMm024806 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 30 Apr 2015 12:01:24 -0400 Received: from localhost.localdomain (ovpn-113-143.phx2.redhat.com [10.3.113.143]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3UG1NcM030935; Thu, 30 Apr 2015 12:01:24 -0400 Message-ID: <554251D3.6070109@redhat.com> Date: Thu, 30 Apr 2015 16:04:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Richard Biener CC: GCC Patches Subject: Re: More type narrowing in match.pd References: <5541A704.3070502@redhat.com> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg02059.txt.bz2 On 04/30/2015 03:00 AM, Richard Biener wrote: > > Without looking too close at this patch I'll note that we might want to > improve the previous one first to also handle a constant 2nd operand > for the operation (your new one also misses that). Yea, I think you mentioned in that in the 47477 BZ as well. If you've got testcases, pass them along so that we can build testcases around those forms as well. > and it was noticed multiple times that the type comparison boiler-plate > needs some helper function. Like Yes. It's on the TODO list. There's certainly more follow-ups in the pipeline. If we want to factor out the boiler-plate now, that works for me. > > And if you'd like to lend helping hands to adding patterns then transitioning > patterns from fold-const.c to match.pd is more appreciated than inventing > new ones ;) The next round of work is much more likely to be reimplementing the operand shortening code shared between the C/C++ front-ends in match.pd and removal of the C/C++ operand shortening code. This patch didn't fit into that work terribly well and seemed self-contained enough to go forward now rather than waiting. Jeff