Commit 85c69b0b by Richard Biener Committed by Richard Biener

re PR tree-optimization/68492 (internal compiler error: in vect_is_simple_use,…

re PR tree-optimization/68492 (internal compiler error: in vect_is_simple_use, at tree-vect-stmts.c:8266)

2015-11-25  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/68492
	* tree-vect-slp.c (vect_build_slp_tree): Consistently build up
	op from scalars after operand swapping.

From-SVN: r230855
parent 993a6bd9
2015-11-25 Richard Biener <rguenther@suse.de> 2015-11-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/68492
* tree-vect-slp.c (vect_build_slp_tree): Consistently build up
op from scalars after operand swapping.
2015-11-25 Richard Biener <rguenther@suse.de>
PR tree-optimization/68502 PR tree-optimization/68502
* tree-vect-data-refs.c (vect_analyze_group_access_1): Restore * tree-vect-data-refs.c (vect_analyze_group_access_1): Restore
check that the step is a multiple of the type size. check that the step is a multiple of the type size.
...@@ -1078,6 +1078,35 @@ vect_build_slp_tree (vec_info *vinfo, ...@@ -1078,6 +1078,35 @@ vect_build_slp_tree (vec_info *vinfo,
tem, npermutes, &this_tree_size, tem, npermutes, &this_tree_size,
max_tree_size)) max_tree_size))
{ {
/* If we have all children of child built up from scalars then
just throw that away and build it up this node from scalars. */
if (!SLP_TREE_CHILDREN (child).is_empty ())
{
unsigned int j;
slp_tree grandchild;
FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (child), j, grandchild)
if (grandchild != NULL)
break;
if (!grandchild)
{
/* Roll back. */
*max_nunits = old_max_nunits;
loads->truncate (old_nloads);
FOR_EACH_VEC_ELT (SLP_TREE_CHILDREN (child), j, grandchild)
vect_free_slp_tree (grandchild);
SLP_TREE_CHILDREN (child).truncate (0);
dump_printf_loc (MSG_NOTE, vect_location,
"Building parent vector operands from "
"scalars instead\n");
oprnd_info->def_stmts = vNULL;
vect_free_slp_tree (child);
SLP_TREE_CHILDREN (*node).quick_push (NULL);
continue;
}
}
/* ... so if successful we can apply the operand swapping /* ... so if successful we can apply the operand swapping
to the GIMPLE IL. This is necessary because for example to the GIMPLE IL. This is necessary because for example
vect_get_slp_defs uses operand indexes and thus expects vect_get_slp_defs uses operand indexes and thus expects
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment