Commit 1d61ee42 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/54610 (FAIL: gcc.dg/tree-ssa/forwprop-22.c (internal…

re PR tree-optimization/54610 (FAIL: gcc.dg/tree-ssa/forwprop-22.c (internal compiler error) on x86 AVX targets)

	PR tree-optimization/54610
	* tree-ssa-forwprop.c: Include optabs.h.  Don't include
	tree-vectorizer.h.
	(simplify_vector_constructor): Don't use vect_gen_perm_mask,
	instead create the mask constant here.
	* Makefile.in (tree-ssa-forwprop.o): Depend on $(OPTABS_H).
	Don't depend on $(TREE_VECTORIZER_H).

	* gcc.target/i386/pr54610.c: New test.

From-SVN: r191421
parent 6889a650
2012-09-18 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/54610
* tree-ssa-forwprop.c: Include optabs.h. Don't include
tree-vectorizer.h.
(simplify_vector_constructor): Don't use vect_gen_perm_mask,
instead create the mask constant here.
* Makefile.in (tree-ssa-forwprop.o): Depend on $(OPTABS_H).
Don't depend on $(TREE_VECTORIZER_H).
2012-09-18 Florian Weimer <fweimer@redhat.com>
* Makefile.in (BASIC_BLOCK_H): Add cfg-flags.def.
......
......@@ -2246,7 +2246,7 @@ tree-ssa-forwprop.o : tree-ssa-forwprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(TM_P_H) $(BASIC_BLOCK_H) $(CFGLOOP_H) \
$(TREE_FLOW_H) $(TREE_PASS_H) $(DIAGNOSTIC_H) \
langhooks.h $(FLAGS_H) $(GIMPLE_H) $(GIMPLE_PRETTY_PRINT_H) $(EXPR_H) \
$(TREE_VECTORIZER_H)
$(OPTABS_H)
tree-ssa-phiprop.o : tree-ssa-phiprop.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \
$(TM_H) $(TREE_H) $(TM_P_H) $(BASIC_BLOCK_H) \
$(TREE_FLOW_H) $(TREE_PASS_H) $(DIAGNOSTIC_H) \
......
2012-09-18 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/54610
* gcc.target/i386/pr54610.c: New test.
2012-09-17 Jason Merrill <jason@redhat.com>
PR c++/54575
......
......@@ -33,7 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple.h"
#include "expr.h"
#include "cfgloop.h"
#include "tree-vectorizer.h"
#include "optabs.h"
/* This pass propagates the RHS of assignment statements into use
sites of the LHS of the assignment. It's basically a specialized
......@@ -2854,14 +2854,24 @@ simplify_vector_constructor (gimple_stmt_iterator *gsi)
return false;
if (maybe_ident)
{
gimple_assign_set_rhs_from_tree (gsi, orig);
}
gimple_assign_set_rhs_from_tree (gsi, orig);
else
{
op2 = vect_gen_perm_mask (type, sel);
if (!op2)
tree mask_type, *mask_elts;
if (!can_vec_perm_p (TYPE_MODE (type), false, sel))
return false;
mask_type
= build_vector_type (build_nonstandard_integer_type (elem_size, 1),
nelts);
if (GET_MODE_CLASS (TYPE_MODE (mask_type)) != MODE_VECTOR_INT
|| GET_MODE_SIZE (TYPE_MODE (mask_type))
!= GET_MODE_SIZE (TYPE_MODE (type)))
return false;
mask_elts = XALLOCAVEC (tree, nelts);
for (i = 0; i < nelts; i++)
mask_elts[i] = build_int_cst (TREE_TYPE (mask_type), sel[i]);
op2 = build_vector (mask_type, mask_elts);
gimple_assign_set_rhs_with_ops_1 (gsi, VEC_PERM_EXPR, orig, orig, op2);
}
update_stmt (gsi_stmt (*gsi));
......
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