diff --git a/gcc/tree-vect-slp.cc b/gcc/tree-vect-slp.cc
index 9d2d0f98ea8..aa442d53999 100644
--- a/gcc/tree-vect-slp.cc
+++ b/gcc/tree-vect-slp.cc
@@ -3137,6 +3137,7 @@ fail:
 	      SLP_TREE_VECTYPE (pnode) = vectype;
 	      SLP_TREE_CHILDREN (pnode).quick_push (child);
 	      SLP_TREE_CHILDREN (pnode).quick_push (child);
+	      SLP_TREE_REPRESENTATIVE (pnode) = NULL;
 	      lane_permutation_t& perm = SLP_TREE_LANE_PERMUTATION (pnode);
 	      children.safe_push (pnode);
 
@@ -3166,6 +3167,7 @@ fail:
       SLP_TREE_CODE (node) = VEC_PERM_EXPR;
       SLP_TREE_CHILDREN (node).quick_push (one);
       SLP_TREE_CHILDREN (node).quick_push (two);
+      SLP_TREE_REPRESENTATIVE (node) = NULL;
       enum tree_code code0 = ERROR_MARK;
       enum tree_code ocode = ERROR_MARK;
       if (gassign *stmt = dyn_cast <gassign *> (stmts[0]->stmt))
