diff options
author | J"orn Rennecke <joern.rennecke@superh.com> | 2002-07-10 18:51:20 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 2002-07-10 19:51:20 +0100 |
commit | 80ba02b10c3060024c1a9838430b95a46a5a56f9 (patch) | |
tree | 1fb2ff706d619a9822938fad912ec418d76d923b /gcc/combine.c | |
parent | 6e04241fb6db6c38975b89855be52b56fdf57b74 (diff) | |
download | gcc-80ba02b10c3060024c1a9838430b95a46a5a56f9.zip gcc-80ba02b10c3060024c1a9838430b95a46a5a56f9.tar.gz gcc-80ba02b10c3060024c1a9838430b95a46a5a56f9.tar.bz2 |
combine.c (gen_lowpart_for_combine): Handle vector modes.
* combine.c (gen_lowpart_for_combine): Handle vector modes.
Supply non-VOID mode to simplify_gen_subreg.
From-SVN: r55375
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 646abec..f9d4b40 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -9831,12 +9831,6 @@ 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. */ @@ -9903,9 +9897,15 @@ gen_lowpart_for_combine (mode, x) { int offset = 0; rtx res; + enum machine_mode sub_mode = GET_MODE (x); - offset = subreg_lowpart_offset (mode, GET_MODE (x)); - res = simplify_gen_subreg (mode, x, GET_MODE (x), offset); + offset = subreg_lowpart_offset (mode, sub_mode); + if (sub_mode == VOIDmode) + { + sub_mode = int_mode_for_mode (mode); + x = gen_lowpart_common (sub_mode, x); + } + res = simplify_gen_subreg (mode, x, sub_mode, offset); if (res) return res; return gen_rtx_CLOBBER (GET_MODE (x), const0_rtx); |