diff --git a/gcc/config/mips/mips.md b/gcc/config/mips/mips.md index 6a1b63b00d2..85e7d67901f 100644 --- a/gcc/config/mips/mips.md +++ b/gcc/config/mips/mips.md @@ -3952,7 +3952,7 @@ (define_insn_and_split "*extenddi_truncate" [(set (match_operand:DI 0 "register_operand" "=d") (sign_extend:DI - (truncate:SUBDI (match_operand:DI 1 "register_operand" "d"))))] + (truncate:SHORT (match_operand:DI 1 "register_operand" "d"))))] "TARGET_64BIT && !TARGET_MIPS16 && !ISA_HAS_EXTS" "#" "&& reload_completed" diff --git a/gcc/rtlanal.cc b/gcc/rtlanal.cc index c5062ab7715..88561a54e5a 100644 --- a/gcc/rtlanal.cc +++ b/gcc/rtlanal.cc @@ -6201,17 +6201,6 @@ truncated_to_mode (machine_mode mode, const_rtx x) if (REG_P (x) && rtl_hooks.reg_truncated_to_mode (mode, x)) return true; - /* This explicit TRUNCATE may be needed on targets that require - MODE to be suitably extended when stored in X. Targets such as - mips64 use (sign_extend:DI (truncate:SI (reg:DI x))) to perform - an explicit extension, avoiding use of (subreg:SI (reg:DI x)) - which is assumed to already be extended. */ - scalar_int_mode imode, omode; - if (is_a (mode, &imode) - && is_a (GET_MODE (x), &omode) - && targetm.mode_rep_extended (imode, omode) != UNKNOWN) - return false; - /* See if we already satisfy the requirements of MODE. If yes we can just switch to MODE. */ if (num_sign_bit_copies_in_rep[GET_MODE (x)][mode]