diff options
Diffstat (limited to 'contrib/gcc/expr.c')
-rw-r--r-- | contrib/gcc/expr.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/contrib/gcc/expr.c b/contrib/gcc/expr.c index f0e63bcc205f..9f7c2847c58d 100644 --- a/contrib/gcc/expr.c +++ b/contrib/gcc/expr.c @@ -1425,6 +1425,15 @@ convert_modes (mode, oldmode, x, unsignedp) return gen_lowpart (mode, x); } + /* Converting from integer constant into mode is always equivalent to an + subreg operation. */ + if (VECTOR_MODE_P (mode) && GET_MODE (x) == VOIDmode) + { + if (GET_MODE_BITSIZE (mode) != GET_MODE_BITSIZE (oldmode)) + abort (); + return simplify_gen_subreg (mode, x, oldmode, 0); + } + temp = gen_reg_rtx (mode); convert_move (temp, x, unsignedp); return temp; |