From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17505 invoked by alias); 20 Jun 2018 10:24:46 -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 17294 invoked by uid 89); 20 Jun 2018 10:24:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: foss.arm.com Received: from usa-sjc-mx-foss1.foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 Jun 2018 10:24:24 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 88BBA80D; Wed, 20 Jun 2018 03:24:09 -0700 (PDT) Received: from localhost (unknown [10.32.98.107]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DFC3A3F589; Wed, 20 Jun 2018 03:24:08 -0700 (PDT) From: Richard Sandiford To: Richard Biener Mail-Followup-To: Richard Biener ,GCC Patches , richard.sandiford@arm.com Cc: GCC Patches Subject: Re: [9/n] PR85694: Add a vect_look_through_pattern helper References: <87d0wof858.fsf@arm.com> Date: Wed, 20 Jun 2018 10:24:00 -0000 In-Reply-To: (Richard Biener's message of "Tue, 19 Jun 2018 12:11:57 +0200") Message-ID: <87r2l1eoxk.fsf@arm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-06/txt/msg01211.txt.bz2 Richard Biener writes: > On Mon, Jun 18, 2018 at 5:04 PM Richard Sandiford > wrote: >> >> When following the definitions of SSA names, some recognisers >> already cope with statements that have been replaced by patterns. >> This patch makes that happen automatically for users of >> type_conversion_p and vect_get_internal_def. It also adds >> a vect_look_through_pattern helper that can be used directly. >> >> The reason for doing this is that the main patch for PR85694 >> makes over_widening handle more general cases. These over-widened >> patterns can still be useful when matching later statements; >> e.g. an overwidened MULT_EXPR could be the input to a DOT_PROD_EXPR. >> >> The patch doesn't do anything with the STMT_VINFO_IN_PATTERN_P checks >> in vect_recog_over_widening_pattern or vect_recog_widen_shift_pattern >> since later patches rewrite them anyway. >> >> Doing this fixed an XFAIL in vect-reduc-dot-u16b.c. >> >> Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? > > Hmm. It seems to me that *def_stmt for vect_is_simple_use should > eventually be the pattern def given the vectype overload takes the > vectype from the pattern def already but oddly enough the > DEF_TYPE is taken from the non-pattern stmt. > > I wonder which callers look at def_stmt at all (and how...) > > I guess swapping the def_stmt and dt arguments and adding yet another > overload to remove all unused &def_stmt args might this easier to review... > > So - I'm suggesting to change vect_is_simple_use. OK, I'll try that. Might end up being its own mini-series. :-) I'll post the next set of patches anyway since they don't depend on *how* this is fixed, just that it is. Thanks, Richard