--- gcc/config/i960/i960.md 2018/04/24 18:10:26 1.1.1.1 +++ gcc/config/i960/i960.md 2018/04/24 18:22:43 1.1.1.2 @@ -1657,14 +1657,25 @@ return \"clrbit %2,%1,%0\"; }") +;; (not (ashift 1 reg)) canonicalizes to (rotate -2 reg) (define_insn "" [(set (match_operand:SI 0 "register_operand" "=d") - (and:SI (ashift:SI (const_int 1) + (and:SI (rotate:SI (const_int -2) (match_operand:SI 1 "register_operand" "d")) - (match_operand:SI 2 "arith_operand" "dI")))] + (match_operand:SI 2 "register_operand" "d")))] "" "clrbit %1,%2,%0") +;; The above pattern canonicalizes to this when both the input and output +;; are the same pseudo-register. +(define_insn "" + [(set (zero_extract:SI (match_operand:SI 0 "register_operand" "=d") + (const_int 1) + (match_operand:SI 1 "register_operand" "d")) + (const_int 0))] + "" + "clrbit %1,%0,%0") + (define_insn "" [(set (match_operand:SI 0 "register_operand" "=d") (xor:SI (match_operand:SI 1 "arith_operand" "dI") @@ -2149,7 +2160,7 @@ ;;- jump to subroutine (define_expand "call" - [(call (match_operand:SI 0 "general_operand" "g") + [(call (match_operand:SI 0 "memory_operand" "m") (match_operand:SI 1 "immediate_operand" "i"))] "" " @@ -2168,7 +2179,7 @@ ;; no local registers available for spills. (define_insn "call_internal" - [(call (match_operand:SI 0 "general_operand" "g") + [(call (match_operand:SI 0 "memory_operand" "m") (match_operand:SI 1 "immediate_operand" "i")) (use (match_operand:SI 2 "address_operand" "p")) (clobber (reg:SI 19))] @@ -2179,7 +2190,7 @@ (define_expand "call_value" [(set (match_operand 0 "register_operand" "=d") - (call (match_operand:SI 1 "general_operand" "g") + (call (match_operand:SI 1 "memory_operand" "m") (match_operand:SI 2 "immediate_operand" "i")))] "" " @@ -2194,7 +2205,7 @@ (define_insn "call_value_internal" [(set (match_operand 0 "register_operand" "=d") - (call (match_operand:SI 1 "general_operand" "g") + (call (match_operand:SI 1 "memory_operand" "m") (match_operand:SI 2 "immediate_operand" "i"))) (use (match_operand:SI 3 "address_operand" "p")) (clobber (reg:SI 19))]