diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-30 03:26:47 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-30 03:26:47 +0000 |
commit | 62f6cb566acfcd04ef13609c8b0f77c7a5820558 (patch) | |
tree | 169958d3dc24faf2b53031b4b49215b9603a4d73 /gcc/combine.c | |
parent | 44f01009b63dab5bee833cb0099318ddc63a8350 (diff) | |
download | gcc-62f6cb566acfcd04ef13609c8b0f77c7a5820558.tar.gz |
* combine.c (force_to_mode): Handle FLOAT_MODE destinations
for CONST_INT.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57634 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index e735519ad12..ea12e05c2d2 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -6817,12 +6817,20 @@ force_to_mode (x, mode, mask, reg, just_select) /* If none of the bits in X are needed, return a zero. */ if (! just_select && (nonzero & mask) == 0) - return const0_rtx; + x = const0_rtx; /* If X is a CONST_INT, return a new one. Do this here since the test below will fail. */ if (GET_CODE (x) == CONST_INT) - return gen_int_mode (INTVAL (x) & mask, mode); + { + if (SCALAR_INT_MODE_P (mode)) + return gen_int_mode (INTVAL (x) & mask, mode); + else + { + x = GEN_INT (INTVAL (x) & mask); + return gen_lowpart_common (mode, x); + } + } /* If X is narrower than MODE and we want all the bits in X's mode, just get X in the proper mode. */ |