diff options
author | Bernd Schmidt <bernds@redhat.com> | 2002-04-18 11:29:19 +0000 |
---|---|---|
committer | Bernd Schmidt <bernds@gcc.gnu.org> | 2002-04-18 11:29:19 +0000 |
commit | 2e676d7878ee6adf8b91dcb45462ee1459f6e2f9 (patch) | |
tree | bc5dc7d2596384fcf5c8a0a2862ebb3eb3ea27fd /gcc/combine.c | |
parent | 3d980b9f8a6e5d62881a9266386dce8e5553e161 (diff) | |
download | gcc-2e676d7878ee6adf8b91dcb45462ee1459f6e2f9.zip gcc-2e676d7878ee6adf8b91dcb45462ee1459f6e2f9.tar.gz gcc-2e676d7878ee6adf8b91dcb45462ee1459f6e2f9.tar.bz2 |
Prevent aborts taking a vector mode subreg of a constant integer
From-SVN: r52467
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index e051c61..67f6290 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -3538,6 +3538,9 @@ subst (x, from, to, in_dest, unique_copy) if (GET_CODE (new) == CONST_INT && GET_CODE (x) == SUBREG) { + if (VECTOR_MODE_P (GET_MODE (x))) + return gen_rtx_CLOBBER (VOIDmode, const0_rtx); + x = simplify_subreg (GET_MODE (x), new, GET_MODE (SUBREG_REG (x)), SUBREG_BYTE (x)); @@ -9800,6 +9803,12 @@ gen_lowpart_for_combine (mode, x) || GET_MODE_SIZE (GET_MODE (x)) == GET_MODE_SIZE (mode))) return gen_rtx_CLOBBER (GET_MODE (x), const0_rtx); + /* simplify_gen_subreg does not know how to handle the case where we try + to convert an integer constant to a vector. + ??? We could try to teach it to generate CONST_VECTORs. */ + if (GET_MODE (x) == VOIDmode && VECTOR_MODE_P (mode)) + return gen_rtx_CLOBBER (GET_MODE (x), const0_rtx); + /* X might be a paradoxical (subreg (mem)). In that case, gen_lowpart won't know what to do. So we will strip off the SUBREG here and process normally. */ |