From: Eric Botcazou Date: Sun, 16 Oct 2016 19:38:31 +0000 (+0000) Subject: sparc.c (sparc_expand_vector_init): Only accept literal constants in CONST_VECTORs. X-Git-Tag: releases/gcc-5.5.0~769 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71209619f8455018b50d4e4008bc7e09268cc2d5;p=thirdparty%2Fgcc.git sparc.c (sparc_expand_vector_init): Only accept literal constants in CONST_VECTORs. * config/sparc/sparc.c (sparc_expand_vector_init): Only accept literal constants in CONST_VECTORs. From-SVN: r241220 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2807b974df81..8317108bfb62 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-10-16 Eric Botcazou + + * config/sparc/sparc.c (sparc_expand_vector_init): Only accept literal + constants in CONST_VECTORs. + 2016-10-15 Eric Botcazou * config/sparc/sparc.c (sparc_expand_vec_perm_bmask): Use a scratch diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 349f31f14235..5e4405456182 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -12289,14 +12289,15 @@ sparc_expand_vector_init (rtx target, rtx vals) const machine_mode inner_mode = GET_MODE_INNER (mode); const int n_elts = GET_MODE_NUNITS (mode); int i, n_var = 0; - bool all_same; + bool all_same = true; rtx mem; - all_same = true; for (i = 0; i < n_elts; i++) { rtx x = XVECEXP (vals, 0, i); - if (!CONSTANT_P (x)) + if (!(CONST_INT_P (x) + || GET_CODE (x) == CONST_DOUBLE + || GET_CODE (x) == CONST_FIXED)) n_var++; if (i > 0 && !rtx_equal_p (x, XVECEXP (vals, 0, 0)))