diff options
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r-- | gcc/targhooks.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c index 6deb7b1..14324b7 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -1087,10 +1087,16 @@ default_get_mask_mode (unsigned nunits, unsigned vector_size) unsigned elem_size = vector_size / nunits; machine_mode elem_mode = smallest_mode_for_size (elem_size * BITS_PER_UNIT, MODE_INT); + machine_mode vector_mode; gcc_assert (elem_size * nunits == vector_size); - return mode_for_vector (elem_mode, nunits); + vector_mode = mode_for_vector (elem_mode, nunits); + if (VECTOR_MODE_P (vector_mode) + && !targetm.vector_mode_supported_p (vector_mode)) + vector_mode = BLKmode; + + return vector_mode; } /* By default, the cost model accumulates three separate costs (prologue, |