diff options
Diffstat (limited to 'gcc/rtx-vector-builder.c')
-rw-r--r-- | gcc/rtx-vector-builder.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/rtx-vector-builder.c b/gcc/rtx-vector-builder.c index ed75263..33f76d0 100644 --- a/gcc/rtx-vector-builder.c +++ b/gcc/rtx-vector-builder.c @@ -65,7 +65,9 @@ rtx_vector_builder::build () if (x) return x; - unsigned int nelts = GET_MODE_NUNITS (m_mode); + unsigned int nelts; + if (!GET_MODE_NUNITS (m_mode).is_constant (&nelts)) + nelts = encoded_nelts (); rtvec v = rtvec_alloc (nelts); for (unsigned int i = 0; i < nelts; ++i) RTVEC_ELT (v, i) = elt (i); |