From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 63887 invoked by alias); 13 May 2015 11:59:39 -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 63872 invoked by uid 89); 13 May 2015 11:59:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 13 May 2015 11:59:37 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 603B2ACFB for ; Wed, 13 May 2015 11:59:34 +0000 (UTC) Date: Wed, 13 May 2015 12:11:00 -0000 From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix PR66129 Message-ID: User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2015-05/txt/msg01212.txt.bz2 The following fixes PR66129. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2015-05-13 Richard Biener PR tree-optimization/66129 * tree-vect-slp.c (vect_build_slp_tree): Make sure all ops are commutative. (vect_schedule_slp_instance): Fix typo. Index: gcc/tree-vect-slp.c =================================================================== *** gcc/tree-vect-slp.c (revision 223119) --- gcc/tree-vect-slp.c (working copy) *************** vect_build_slp_tree (loop_vec_info loop_ *** 1123,1128 **** --- 1123,1129 ---- && oprnds_info[1]->first_dt == vect_internal_def && is_gimple_assign (stmt) && commutative_tree_code (gimple_assign_rhs_code (stmt)) + && !SLP_TREE_TWO_OPERATORS (*node) /* Do so only if the number of not successful permutes was nor more than a cut-ff as re-trying the recursive match on possibly each level of the tree would expose exponential *************** vect_schedule_slp_instance (slp_tree nod *** 3459,3465 **** tree *melts = XALLOCAVEC (tree, TYPE_VECTOR_SUBPARTS (vectype)); for (l = 0; l < TYPE_VECTOR_SUBPARTS (vectype); ++l) { ! if (k > group_size) k = 0; melts[l] = build_int_cst (meltype, mask[k++] * TYPE_VECTOR_SUBPARTS (vectype) + l); --- 3460,3466 ---- tree *melts = XALLOCAVEC (tree, TYPE_VECTOR_SUBPARTS (vectype)); for (l = 0; l < TYPE_VECTOR_SUBPARTS (vectype); ++l) { ! if (k >= group_size) k = 0; melts[l] = build_int_cst (meltype, mask[k++] * TYPE_VECTOR_SUBPARTS (vectype) + l);