+2020-05-12 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR tree-optimization/94980
+ * tree-vect-generic.c (expand_vector_comparison): Use
+ vector_element_bits_tree to get the element size in bits,
+ rather than using TYPE_SIZE.
+ (expand_vector_condition, vector_element): Likewise.
+
2020-05-12 Richard Sandiford <richard.sandiford@arm.com>
PR tree-optimization/94980
+2020-05-12 Richard Sandiford <richard.sandiford@arm.com>
+
+ PR tree-optimization/94980
+ * gcc.target/i386/pr94980.c: New test.
+
2020-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
* gcc.target/powerpc/vec-clzm-0.c: Rename to...
(TREE_TYPE (type)))))
{
tree inner_type = TREE_TYPE (TREE_TYPE (op0));
- tree part_width = TYPE_SIZE (inner_type);
+ tree part_width = vector_element_bits_tree (TREE_TYPE (op0));
tree index = bitsize_int (0);
int nunits = nunits_for_known_piecewise_op (TREE_TYPE (op0));
int prec = GET_MODE_PRECISION (SCALAR_TYPE_MODE (type));
vec<constructor_elt, va_gc> *v;
tree constr;
tree inner_type = TREE_TYPE (type);
+ tree width = vector_element_bits_tree (type);
tree cond_type = TREE_TYPE (TREE_TYPE (a));
tree comp_inner_type = cond_type;
- tree width = TYPE_SIZE (inner_type);
tree index = bitsize_int (0);
tree comp_width = width;
tree comp_index = index;
a1 = TREE_OPERAND (a, 0);
a2 = TREE_OPERAND (a, 1);
comp_inner_type = TREE_TYPE (TREE_TYPE (a1));
- comp_width = TYPE_SIZE (comp_inner_type);
+ comp_width = vector_element_bits_tree (TREE_TYPE (a1));
}
if (expand_vec_cond_expr_p (type, TREE_TYPE (a1), TREE_CODE (a)))
}
else
{
- tree size = TYPE_SIZE (vect_elt_type);
+ tree size = vector_element_bits_tree (vect_type);
tree pos = fold_build2 (MULT_EXPR, bitsizetype, bitsize_int (index),
size);
return fold_build3 (BIT_FIELD_REF, vect_elt_type, vect, size, pos);