With recent disturbed testing this FAIL got unnoticed. Fixed as follows (we have a constant " " that we'd like to replicate in a vector).
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2012-03-16 Richard Guenther <rguent...@suse.de> * tree-vect-stmts.c (vect_get_vec_def_for_operand): Use VIEW_CONVERT_EXPR to convert constants. (vect_is_simple_use): Treat all constants as vec_constant_def. Index: gcc/tree-vect-stmts.c =================================================================== *** gcc/tree-vect-stmts.c (revision 185465) --- gcc/tree-vect-stmts.c (working copy) *************** vect_get_vec_def_for_operand (tree op, g *** 1271,1279 **** if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Create vector_cst. nunits = %d", nunits); ! vec_cst = build_vector_from_val (vector_type, ! fold_convert (TREE_TYPE (vector_type), ! op)); return vect_init_vector (stmt, vec_cst, vector_type, NULL); } --- 1271,1283 ---- if (vect_print_dump_info (REPORT_DETAILS)) fprintf (vect_dump, "Create vector_cst. nunits = %d", nunits); ! if (!types_compatible_p (TREE_TYPE (vector_type), TREE_TYPE (op))) ! { ! op = fold_unary (VIEW_CONVERT_EXPR, TREE_TYPE (vector_type), op); ! gcc_assert (op && CONSTANT_CLASS_P (op)); ! } ! ! vec_cst = build_vector_from_val (vector_type, op); return vect_init_vector (stmt, vec_cst, vector_type, NULL); } *************** vect_is_simple_use (tree operand, gimple *** 5909,5915 **** print_generic_expr (vect_dump, operand, TDF_SLIM); } ! if (TREE_CODE (operand) == INTEGER_CST || TREE_CODE (operand) == REAL_CST) { *dt = vect_constant_def; return true; --- 5913,5919 ---- print_generic_expr (vect_dump, operand, TDF_SLIM); } ! if (CONSTANT_CLASS_P (operand)) { *dt = vect_constant_def; return true;