From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28031 invoked by alias); 9 Jul 2010 13:49:02 -0000 Received: (qmail 27970 invoked by uid 22791); 9 Jul 2010 13:48:59 -0000 X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=AWL,BAYES_00,TW_TM,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Jul 2010 13:48:45 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 6787D8738D for ; Fri, 9 Jul 2010 15:48:43 +0200 (CEST) Date: Fri, 09 Jul 2010 13:49:00 -0000 From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH][4.5] Fix backport of PR44284 fix Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 X-SW-Source: 2010-07/txt/msg00778.txt.bz2 This fixes up the backport which was done to avoid regressing with the fix for PR44828. The issue is that vector types on the branch are a lot messier, thus the following makes everything 100% explicit. Bootstrap and regtest on x86_64-unknown-linux-gnu in progress. I verified it fixes the new ICEs on IA64 seen here: http://gcc.gnu.org/ml/gcc-regression/2010-07/msg00129.html Richard. 2010-07-09 Richard Guenther * tree-vect-stmts.c (vectorizable_assignment): Fixup backport of the fix for PR44284. Index: gcc/tree-vect-stmts.c =================================================================== *** gcc/tree-vect-stmts.c (revision 161997) --- gcc/tree-vect-stmts.c (working copy) *************** vectorizable_assignment (gimple stmt, gi *** 1814,1820 **** gimple new_stmt = NULL; stmt_vec_info prev_stmt_info = NULL; enum tree_code code; ! tree vectype_in; /* Multiple types in SLP are handled by creating the appropriate number of vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in --- 1814,1820 ---- gimple new_stmt = NULL; stmt_vec_info prev_stmt_info = NULL; enum tree_code code; ! tree vectype_in, vectype_out; /* Multiple types in SLP are handled by creating the appropriate number of vectorized stmts for each SLP node. Hence, NCOPIES is always 1 in *************** vectorizable_assignment (gimple stmt, gi *** 1858,1867 **** /* We can handle NOP_EXPR conversions that do not change the number of elements or the vector size. */ vectype_in = get_vectype_for_scalar_type (TREE_TYPE (op)); if (CONVERT_EXPR_CODE_P (code) && (!vectype_in ! || TYPE_VECTOR_SUBPARTS (vectype_in) != nunits ! || (GET_MODE_SIZE (TYPE_MODE (vectype)) != GET_MODE_SIZE (TYPE_MODE (vectype_in))))) return false; --- 1858,1870 ---- /* We can handle NOP_EXPR conversions that do not change the number of elements or the vector size. */ vectype_in = get_vectype_for_scalar_type (TREE_TYPE (op)); + vectype_out + = get_vectype_for_scalar_type (TREE_TYPE (gimple_assign_lhs (stmt))); if (CONVERT_EXPR_CODE_P (code) && (!vectype_in ! || (TYPE_VECTOR_SUBPARTS (vectype_out) ! != TYPE_VECTOR_SUBPARTS (vectype_in)) ! || (GET_MODE_SIZE (TYPE_MODE (vectype_out)) != GET_MODE_SIZE (TYPE_MODE (vectype_in))))) return false; *************** vectorizable_assignment (gimple stmt, gi *** 1894,1900 **** for (i = 0; VEC_iterate (tree, vec_oprnds, i, vop); i++) { if (CONVERT_EXPR_CODE_P (code)) ! vop = build1 (VIEW_CONVERT_EXPR, vectype, vop); new_stmt = gimple_build_assign (vec_dest, vop); new_temp = make_ssa_name (vec_dest, new_stmt); gimple_assign_set_lhs (new_stmt, new_temp); --- 1897,1903 ---- for (i = 0; VEC_iterate (tree, vec_oprnds, i, vop); i++) { if (CONVERT_EXPR_CODE_P (code)) ! vop = build1 (VIEW_CONVERT_EXPR, vectype_out, vop); new_stmt = gimple_build_assign (vec_dest, vop); new_temp = make_ssa_name (vec_dest, new_stmt); gimple_assign_set_lhs (new_stmt, new_temp);