@@ -16075,13 +16075,19 @@ s390_support_vector_misalignment (machine_mode mode ATTRIBUTE_UNUSED,
static HOST_WIDE_INT
s390_vector_alignment (const_tree type)
{
+ tree size = TYPE_SIZE (type);
+
if (!TARGET_VX_ABI)
return default_vector_alignment (type);
if (TYPE_USER_ALIGN (type))
return TYPE_ALIGN (type);
- return MIN (64, tree_to_shwi (TYPE_SIZE (type)));
+ if (tree_fits_uhwi_p (size)
+ && tree_to_uhwi (size) < BIGGEST_ALIGNMENT)
+ return tree_to_uhwi (size);
+
+ return BIGGEST_ALIGNMENT;
}
/* Implement TARGET_CONSTANT_ALIGNMENT. Alignment on even addresses for