* [PATCH][4.5] Fix backport of PR44284 fix
@ 2010-07-09 13:49 Richard Guenther
0 siblings, 0 replies; only message in thread
From: Richard Guenther @ 2010-07-09 13:49 UTC (permalink / raw)
To: gcc-patches
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 <rguenther@suse.de>
* 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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-09 13:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-09 13:49 [PATCH][4.5] Fix backport of PR44284 fix Richard Guenther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).