Commit 48817fbd by Jeff Law

Fix vector-compare-1 regressions on sh4/sh4eb caused by pattern clobbering T…

    Fix vector-compare-1 regressions on sh4/sh4eb caused by pattern clobbering T reg without expressing that in its RTL.

            PR rtl-optimization/90275
            * config/sh/sh.md (mov_neg_si_t): Clobber the T register in the
            pattern.
parent eeb0c7c0
...@@ -8395,9 +8395,15 @@ ...@@ -8395,9 +8395,15 @@
;; Store (negated) T bit as all zeros or ones in a reg. ;; Store (negated) T bit as all zeros or ones in a reg.
;; subc Rn,Rn ! Rn = Rn - Rn - T; T = T ;; subc Rn,Rn ! Rn = Rn - Rn - T; T = T
;; not Rn,Rn ! Rn = 0 - Rn ;; not Rn,Rn ! Rn = 0 - Rn
;;
;; Note the call to sh_split_treg_set_expr may clobber
;; the T reg. We must express this, even though it's
;; not immediately obvious this pattern changes the
;; T register.
(define_insn_and_split "mov_neg_si_t" (define_insn_and_split "mov_neg_si_t"
[(set (match_operand:SI 0 "arith_reg_dest" "=r") [(set (match_operand:SI 0 "arith_reg_dest" "=r")
(neg:SI (match_operand 1 "treg_set_expr")))] (neg:SI (match_operand 1 "treg_set_expr")))
(clobber (reg:SI T_REG))]
"TARGET_SH1" "TARGET_SH1"
{ {
gcc_assert (t_reg_operand (operands[1], VOIDmode)); gcc_assert (t_reg_operand (operands[1], VOIDmode));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment