From ccf7aef4284066b77a1424df2d282be17d2b2083 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 29 Sep 2002 20:26:47 -0700 Subject: combine.c (force_to_mode): Handle FLOAT_MODE destinations for CONST_INT. * combine.c (force_to_mode): Handle FLOAT_MODE destinations for CONST_INT. From-SVN: r57634 --- gcc/combine.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'gcc/combine.c') diff --git a/gcc/combine.c b/gcc/combine.c index e735519..ea12e05 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. */ -- cgit v1.1