aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1992-12-26 18:11:20 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1992-12-26 18:11:20 -0500
commiteae957a8b8701537efa1af34a619971e5f81827e (patch)
treef31daf97cc7a7e3981def1d3b2f67d4fd910f5bc /gcc/combine.c
parentbc957254f84a395d45e2fe9734defd0812bedd6a (diff)
downloadgcc-eae957a8b8701537efa1af34a619971e5f81827e.zip
gcc-eae957a8b8701537efa1af34a619971e5f81827e.tar.gz
gcc-eae957a8b8701537efa1af34a619971e5f81827e.tar.bz2
(gen_lowpart_for_combine): Allow MODE to be wider than a word in
restricted circumstances. From-SVN: r2914
Diffstat (limited to 'gcc/combine.c')
-rw-r--r--gcc/combine.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/combine.c b/gcc/combine.c
index 331e6ce..360c81e 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -7416,7 +7416,14 @@ gen_lowpart_for_combine (mode, x)
if (GET_MODE (x) == mode)
return x;
- if (GET_MODE_SIZE (mode) > UNITS_PER_WORD)
+ /* We can only support MODE being wider than a word if X is a
+ constant integer or has a mode the same size. */
+
+ if (GET_MODE_SIZE (mode) > UNITS_PER_WORD
+ && ! ((GET_MODE (x) == VOIDmode
+ && (GET_CODE (x) == CONST_INT
+ || GET_CODE (x) == CONST_DOUBLE))
+ || GET_MODE_SIZE (GET_MODE (x)) == GET_MODE_SIZE (mode)))
return gen_rtx (CLOBBER, GET_MODE (x), const0_rtx);
/* X might be a paradoxical (subreg (mem)). In that case, gen_lowpart