diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index 3e978254ab0c8b1e8ce8b6a6915fb31e92c7582a..7eee12ca6b8a6c19b7f1212b6e37425392c929dd 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -8408,7 +8408,7 @@ gcc_assert (t_reg_operand (operands[1], VOIDmode)); return "subc %0,%0"; } - "&& can_create_pseudo_p () && !t_reg_operand (operands[1], VOIDmode)" + "&& !t_reg_operand (operands[1], VOIDmode)" [(const_int 0)] { sh_treg_insns ti = sh_split_treg_set_expr (operands[1], curr_insn); @@ -8421,6 +8421,14 @@ } [(set_attr "type" "arith")]) +;; no-op T bit move which can result from other optimizations. +(define_insn_and_split "*treg_noop_move" + [(set (reg:SI T_REG) (reg:SI T_REG))] + "TARGET_SH1" + "#" + "&& 1" + [(const_int 0)]) + ;; Invert the T bit. ;; On SH2A we can use the nott insn. On anything else this must be done with ;; multiple insns like: