From 754731823fbe874204c1277823e07d9673aa3e93 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Sat, 16 May 1992 18:14:50 +0000 Subject: [PATCH] *** empty log message *** From-SVN: r997 --- gcc/combine.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/gcc/combine.c b/gcc/combine.c index 8db1fb9fef1..044a4137bc3 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -3687,11 +3687,16 @@ expand_compound_operation (x) case ZERO_EXTEND: unsignedp = 1; case SIGN_EXTEND: - /* If we somehow managed to end up with (sign/zero_extend (const_int x)), - just return the CONST_INT. We can't know how much masking to do - in that case. */ + /* We can't necessarily use a const_int for a multiword mode; + it depends on implicitly extending the value. + Since we don't know the right way to extend it, + we can't tell whether the implicit way is right. + + Even for a mode that is no wider than a const_int, + we can't win, because we need to sign extend one of its bits through + the rest of it, and we don't know which bit. */ if (GET_CODE (XEXP (x, 0)) == CONST_INT) - return XEXP (x, 0); + return x; if (! FAKE_EXTEND_SAFE_P (GET_MODE (XEXP (x, 0)), XEXP (x, 0))) return x; -- 2.30.2