Commit d21a353d by Jim Wilson

(zero_extendqisi2+4,+5): Add new patterns for combining a SI->QI mode truncate...

(zero_extendqisi2+4,+5): Add new patterns for combining
a SI->QI mode truncate with an insn that sets the condition codes.

From-SVN: r3743
parent 6f0f0637
...@@ -1419,6 +1419,26 @@ ...@@ -1419,6 +1419,26 @@
"andcc %1,0xff,%0" "andcc %1,0xff,%0"
[(set_attr "type" "unary")]) [(set_attr "type" "unary")])
;; Similarly, handle SI->QI mode truncation followed by a compare.
(define_insn ""
[(set (reg:CC 0)
(compare:CC (subreg:QI (match_operand:SI 0 "register_operand" "r") 0)
(const_int 0)))]
""
"andcc %0,0xff,%%g0"
[(set_attr "type" "compare")])
(define_insn ""
[(set (reg:CC 0)
(compare:CC (subreg:QI (match_operand:SI 1 "register_operand" "r") 0)
(const_int 0)))
(set (match_operand:QI 0 "register_operand" "=r")
(match_dup 1))]
""
"andcc %1,0xff,%0"
[(set_attr "type" "unary")])
;;- sign extension instructions ;;- sign extension instructions
;; These patterns originally accepted general_operands, however, slightly ;; These patterns originally accepted general_operands, however, slightly
......
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