From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95405 invoked by alias); 2 Jun 2017 13:10:30 -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 95383 invoked by uid 89); 2 Jun 2017 13:10:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,GIT_PATCH_3,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 02 Jun 2017 13:10:28 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id A261FABBD for ; Fri, 2 Jun 2017 13:10:30 +0000 (UTC) Date: Fri, 02 Jun 2017 13:10:00 -0000 From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH][3/n] Fixup hybrid SLP detection in patterns Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-SW-Source: 2017-06/txt/msg00126.txt.bz2 This matches up the two different implementations. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-06-02 Richard Biener * tree-vect-slp.c (vect_detect_hybrid_slp_2): Match up what we consider a relevant use stmt with vect_detect_hybrid_slp_stmts. Index: gcc/tree-vect-slp.c =================================================================== --- gcc/tree-vect-slp.c (revision 248819) +++ gcc/tree-vect-slp.c (working copy) @@ -2245,9 +2245,16 @@ static tree vect_detect_hybrid_slp_2 (gimple_stmt_iterator *gsi, bool *handled, walk_stmt_info *) { + stmt_vec_info use_vinfo = vinfo_for_stmt (gsi_stmt (*gsi)); /* If the stmt is in a SLP instance then this isn't a reason to mark use definitions in other SLP instances as hybrid. */ - if (STMT_SLP_TYPE (vinfo_for_stmt (gsi_stmt (*gsi))) != loop_vect) + if (! STMT_SLP_TYPE (use_vinfo) + && (STMT_VINFO_RELEVANT (use_vinfo) + || VECTORIZABLE_CYCLE_DEF (STMT_VINFO_DEF_TYPE (use_vinfo))) + && ! (gimple_code (gsi_stmt (*gsi)) == GIMPLE_PHI + && STMT_VINFO_DEF_TYPE (use_vinfo) == vect_reduction_def)) + ; + else *handled = true; return NULL_TREE; }