+2004-11-28 Hans-Peter Nilsson <hp@bitrange.com>
+
+ PR target/18331
+ * config/mmix/mmix.md ("*movdicc_real_reversible"): Rename from
+ "*movdicc_real". Only match reversible comparisons.
+ ("*movdicc_real_nonreversible"): New pattern, split from
+ "*movdicc_real". Match only nonreversible comparisons. Exclude
+ reversed alternatives.
+ ("*movdfcc_real_reversible", "*movdfcc_real_nonreversible"):
+ Similar.
+
2004-11-27 Richard Henderson <rth@redhat.com>
* config/ia64/ia64.md: Move all define_predicate's ...
ZS%d2 %0,%3,%1
ZS%D2 %0,%3,%4")
-(define_insn "*movdicc_real"
+(define_insn "*movdicc_real_reversible"
[(set
(match_operand:DI 0 "register_operand" "=r ,r ,r ,r")
(if_then_else:DI
(const_int 0)])
(match_operand:DI 1 "mmix_reg_or_8bit_operand" "rI,0 ,rI,GM")
(match_operand:DI 4 "mmix_reg_or_8bit_operand" "0 ,rI,GM,rI")))]
- ""
+ "REVERSIBLE_CC_MODE (GET_MODE (operands[3]))"
"@
CS%d2 %0,%3,%1
CS%D2 %0,%3,%4
ZS%d2 %0,%3,%1
ZS%D2 %0,%3,%4")
+(define_insn "*movdicc_real_nonreversible"
+ [(set
+ (match_operand:DI 0 "register_operand" "=r ,r")
+ (if_then_else:DI
+ (match_operator
+ 2 "mmix_comparison_operator"
+ [(match_operand 3 "mmix_reg_cc_operand" "r ,r")
+ (const_int 0)])
+ (match_operand:DI 1 "mmix_reg_or_8bit_operand" "rI,rI")
+ (match_operand:DI 4 "mmix_reg_or_0_operand" "0 ,GM")))]
+ "!REVERSIBLE_CC_MODE (GET_MODE (operands[3]))"
+ "@
+ CS%d2 %0,%3,%1
+ ZS%d2 %0,%3,%1")
+
(define_insn "*movdfcc_real_foldable"
[(set
(match_operand:DF 0 "register_operand" "=r ,r ,r ,r")
ZS%d2 %0,%3,%1
ZS%D2 %0,%3,%4")
-(define_insn "*movdfcc_real"
+(define_insn "*movdfcc_real_reversible"
[(set
(match_operand:DF 0 "register_operand" "=r ,r ,r ,r")
(if_then_else:DF
(const_int 0)])
(match_operand:DF 1 "mmix_reg_or_0_operand" "rGM,0 ,rGM,GM")
(match_operand:DF 4 "mmix_reg_or_0_operand" "0 ,rGM,GM ,rGM")))]
- ""
+ "REVERSIBLE_CC_MODE (GET_MODE (operands[3]))"
"@
CS%d2 %0,%3,%1
CS%D2 %0,%3,%4
ZS%d2 %0,%3,%1
ZS%D2 %0,%3,%4")
+(define_insn "*movdfcc_real_nonreversible"
+ [(set
+ (match_operand:DF 0 "register_operand" "=r ,r")
+ (if_then_else:DF
+ (match_operator
+ 2 "mmix_comparison_operator"
+ [(match_operand 3 "mmix_reg_cc_operand" "r ,r")
+ (const_int 0)])
+ (match_operand:DF 1 "mmix_reg_or_0_operand" "rGM,rGM")
+ (match_operand:DF 4 "mmix_reg_or_0_operand" "0 ,GM")))]
+ "!REVERSIBLE_CC_MODE (GET_MODE (operands[3]))"
+ "@
+ CS%d2 %0,%3,%1
+ ZS%d2 %0,%3,%1")
+
;; FIXME: scc patterns will probably help, I just skip them
;; right now. Revisit.
\f