commit 73e76eff0f99eff8d2a6b40ac4ea662a98c7c45d
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date: Mon Aug 4 16:49:24 2014 +0100
[AArch64] Use CC_NZ in csinc pattern
@@ -2596,21 +2596,21 @@ (define_insn "aarch64_<crc_variant>"
[(set_attr "type" "crc")]
)
-(define_insn "*csinc2<mode>_insn"
+(define_insn "*csinc2<mode>_<CC_ZERO:mode>_insn"
[(set (match_operand:GPI 0 "register_operand" "=r")
(plus:GPI (match_operator:GPI 2 "aarch64_comparison_operator"
- [(match_operand:CC 3 "cc_register" "") (const_int 0)])
+ [(match_operand:CC_ZERO 3 "cc_register" "") (const_int 0)])
(match_operand:GPI 1 "register_operand" "r")))]
""
"csinc\\t%<w>0, %<w>1, %<w>1, %M2"
[(set_attr "type" "csel")]
)
-(define_insn "csinc3<mode>_insn"
+(define_insn "csinc3<GPI:mode>_<CC_ZERO:mode>_insn"
[(set (match_operand:GPI 0 "register_operand" "=r")
(if_then_else:GPI
(match_operator:GPI 1 "aarch64_comparison_operator"
- [(match_operand:CC 2 "cc_register" "") (const_int 0)])
+ [(match_operand:CC_ZERO 2 "cc_register" "") (const_int 0)])
(plus:GPI (match_operand:GPI 3 "register_operand" "r")
(const_int 1))
(match_operand:GPI 4 "aarch64_reg_or_zero" "rZ")))]
@@ -2619,11 +2619,11 @@ (define_insn "csinc3<mode>_insn"
[(set_attr "type" "csel")]
)
-(define_insn "*csinv3<mode>_insn"
+(define_insn "*csinv3<GPI:mode>_<CC_ZERO:mode>_insn"
[(set (match_operand:GPI 0 "register_operand" "=r")
(if_then_else:GPI
(match_operator:GPI 1 "aarch64_comparison_operator"
- [(match_operand:CC 2 "cc_register" "") (const_int 0)])
+ [(match_operand:CC_ZERO 2 "cc_register" "") (const_int 0)])
(not:GPI (match_operand:GPI 3 "register_operand" "r"))
(match_operand:GPI 4 "aarch64_reg_or_zero" "rZ")))]
""
@@ -2631,11 +2631,11 @@ (define_insn "*csinv3<mode>_insn"
[(set_attr "type" "csel")]
)
-(define_insn "*csneg3<mode>_insn"
+(define_insn "*csneg3<GPI:mode>_<CC_ZERO:mode>_insn"
[(set (match_operand:GPI 0 "register_operand" "=r")
(if_then_else:GPI
(match_operator:GPI 1 "aarch64_comparison_operator"
- [(match_operand:CC 2 "cc_register" "") (const_int 0)])
+ [(match_operand:CC_ZERO 2 "cc_register" "") (const_int 0)])
(neg:GPI (match_operand:GPI 3 "register_operand" "r"))
(match_operand:GPI 4 "aarch64_reg_or_zero" "rZ")))]
""
@@ -2896,7 +2896,7 @@ (define_expand "ffs<mode>2"
emit_insn (gen_rbit<mode>2 (operands[0], operands[1]));
emit_insn (gen_clz<mode>2 (operands[0], operands[0]));
- emit_insn (gen_csinc3<mode>_insn (operands[0], x, ccreg, operands[0], const0_rtx));
+ emit_insn (gen_csinc3<mode>_cc_insn (operands[0], x, ccreg, operands[0], const0_rtx));
DONE;
}
)
@@ -191,6 +191,9 @@ (define_mode_iterator VMUL [V4HI V8HI V2SI V4SI V2SF V4SF V2DF])
;; Modes available for <f>mul lane operations changing lane count.
(define_mode_iterator VMUL_CHANGE_NLANES [V4HI V8HI V2SI V4SI V2SF V4SF])
+;; Iterator over CC, CC_Z, CC_NZ
+(define_mode_iterator CC_ZERO [CC CC_Z CC_NZ])
+
;; ------------------------------------------------------------------
;; Unspec enumerations for Advance SIMD. These could well go into
;; aarch64.md but for their use in int_iterators here.