+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.
$(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) \
#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
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));