+2005-06-29 Steve Ellcey <sje@cup.hp.com>
+
+ PR middle-end/21969
+ * tree.h (TYPE_VECTOR_SUBPARTS): Change to shift expression.
+ (SET_TYPE_VECTOR_SUBPARTS): New.
+ * tree.c (make_vector_type): Replace TYPE_VECTOR_SUBPARTS with
+ SET_TYPE_VECTOR_SUBPARTS.
+ * tree-vect-transform.c (vect_transform_loop): Add cast.
+
2005-06-29 Andreas Krebbel <krebbel1@de.ibm.com>
* config/s390/s390.c (s390_decompose_address): Accept invalid
units and no inner unrolling is necessary. */
gcc_assert
(TYPE_VECTOR_SUBPARTS (STMT_VINFO_VECTYPE (stmt_info))
- == vectorization_factor);
+ == (unsigned HOST_WIDE_INT) vectorization_factor);
/* -------- vectorize statement ------------ */
if (vect_print_dump_info (REPORT_DETAILS, UNKNOWN_LOC))
tree t = make_node (VECTOR_TYPE);
TREE_TYPE (t) = TYPE_MAIN_VARIANT (innertype);
- TYPE_VECTOR_SUBPARTS (t) = nunits;
+ SET_TYPE_VECTOR_SUBPARTS (t, nunits);
TYPE_MODE (t) = mode;
TYPE_READONLY (t) = TYPE_READONLY (innertype);
TYPE_VOLATILE (t) = TYPE_VOLATILE (innertype);
/* For a VECTOR_TYPE, this is the number of sub-parts of the vector. */
#define TYPE_VECTOR_SUBPARTS(VECTOR_TYPE) \
- (VECTOR_TYPE_CHECK (VECTOR_TYPE)->type.precision)
+ (((unsigned HOST_WIDE_INT) 1) \
+ << VECTOR_TYPE_CHECK (VECTOR_TYPE)->type.precision)
+
+/* Set precision to n when we have 2^n sub-parts of the vector. */
+#define SET_TYPE_VECTOR_SUBPARTS(VECTOR_TYPE, X) \
+ (VECTOR_TYPE_CHECK (VECTOR_TYPE)->type.precision = exact_log2 (X))
/* Indicates that objects of this type must be initialized by calling a
function when they are created. */