From d14057222fec681710cd1b1ac1d47478c0466bfb Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Tue, 6 Feb 2001 12:39:15 +0000 Subject: combine.c (nonzero_bits, case PLUS): If pointers extend unsigned and this is the sum of a pointer and a constant... * combine.c (nonzero_bits, case PLUS): If pointers extend unsigned and this is the sum of a pointer and a constant, we know the result did not overflow. (num_sign_bit_copies, case PLUS): Likewise. * explow.c (convert_memory_address): Remove opposite SUBREG. * function.c (instantiate_new_reg): New function (from common code). (instantiate_virtual_regs_1): Call it. For PLUS, handle if (plus (subreg (virt-reg) (const_int)) if pointers sign- or zero-extend. * simplify-rtx.c (simplify_unary_operation, case ZERO_EXTEND): If pointers extend unsigned, use inside of SUBREG. (simplify_unary_operation, case SIGN_EXTEND): Likewise, if sign extend. From-SVN: r39489 --- gcc/explow.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/explow.c') diff --git a/gcc/explow.c b/gcc/explow.c index d36ceffa440..b7c0bb9f6d9 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -386,6 +386,11 @@ convert_memory_address (to_mode, x) case CONST_DOUBLE: return x; + case SUBREG: + if (GET_MODE (SUBREG_REG (x)) == to_mode) + return SUBREG_REG (x); + break; + case LABEL_REF: temp = gen_rtx_LABEL_REF (to_mode, XEXP (x, 0)); LABEL_REF_NONLOCAL_P (temp) = LABEL_REF_NONLOCAL_P (x); -- cgit v1.2.1