aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index fa03d96..6759ac8 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -10926,8 +10926,15 @@ build_truth_vector_type_for_mode (poly_uint64 nunits, machine_mode mask_mode)
{
gcc_assert (mask_mode != BLKmode);
- poly_uint64 vsize = GET_MODE_BITSIZE (mask_mode);
- unsigned HOST_WIDE_INT esize = vector_element_size (vsize, nunits);
+ unsigned HOST_WIDE_INT esize;
+ if (VECTOR_MODE_P (mask_mode))
+ {
+ poly_uint64 vsize = GET_MODE_BITSIZE (mask_mode);
+ esize = vector_element_size (vsize, nunits);
+ }
+ else
+ esize = 1;
+
tree bool_type = build_nonstandard_boolean_type (esize);
return make_vector_type (bool_type, nunits, mask_mode);