(define_expand "mov<ALLI_GPF:mode>cc"
[(set (match_operand:ALLI_GPF 0 "register_operand")
- (if_then_else:ALLI_GPF (match_operand 1 "aarch64_comparison_operator")
+ (if_then_else:ALLI_GPF (match_operand 1 "aarch64_comparison_operator_cc")
(match_operand:ALLI_GPF 2 "register_operand")
(match_operand:ALLI_GPF 3 "register_operand")))]
""
rtx ccreg = XEXP (operands[1], 0);
enum machine_mode ccmode = GET_MODE (ccreg);
- if (GET_MODE_CLASS (ccmode) == MODE_CC)
- gcc_assert (XEXP (operands[1], 1) == const0_rtx);
- else if (ccmode == QImode || ccmode == HImode)
- FAIL;
- else
+ if (GET_MODE_CLASS (ccmode) != MODE_CC)
{
ccreg = aarch64_gen_compare_reg (code, ccreg, XEXP (operands[1], 1));
operands[1] = gen_rtx_fmt_ee (code, VOIDmode, ccreg, const0_rtx);
(define_expand "mov<GPF:mode><GPI:mode>cc"
[(set (match_operand:GPI 0 "register_operand")
- (if_then_else:GPI (match_operand 1 "aarch64_comparison_operator")
+ (if_then_else:GPI (match_operand 1 "aarch64_comparison_operator_cc")
(match_operand:GPF 2 "register_operand")
(match_operand:GPF 3 "register_operand")))]
""
rtx ccreg = XEXP (operands[1], 0);
enum machine_mode ccmode = GET_MODE (ccreg);
- if (GET_MODE_CLASS (ccmode) == MODE_CC)
- gcc_assert (XEXP (operands[1], 1) == const0_rtx);
- else if (ccmode == QImode || ccmode == HImode)
- FAIL;
- else
+ if (GET_MODE_CLASS (ccmode) != MODE_CC)
{
ccreg = aarch64_gen_compare_reg (code, ccreg, XEXP (operands[1], 1));
operands[1] = gen_rtx_fmt_ee (code, VOIDmode, ccreg, const0_rtx);
(define_expand "<neg_not_op><mode>cc"
[(set (match_operand:GPI 0 "register_operand")
- (if_then_else:GPI (match_operand 1 "aarch64_comparison_operator")
+ (if_then_else:GPI (match_operand 1 "aarch64_comparison_operator_cc")
(NEG_NOT:GPI (match_operand:GPI 2 "register_operand"))
(match_operand:GPI 3 "register_operand")))]
""
rtx ccreg = XEXP (operands[1], 0);
enum machine_mode ccmode = GET_MODE (ccreg);
- if (GET_MODE_CLASS (ccmode) == MODE_CC)
- gcc_assert (XEXP (operands[1], 1) == const0_rtx);
- else if (ccmode == QImode || ccmode == HImode)
- FAIL;
- else
+ if (GET_MODE_CLASS (ccmode) != MODE_CC)
{
ccreg = aarch64_gen_compare_reg (code, ccreg, XEXP (operands[1], 1));
operands[1] = gen_rtx_fmt_ee (code, VOIDmode, ccreg, const0_rtx);
return aarch64_get_condition_code (op) >= 0;
})
+(define_predicate "aarch64_comparison_operator_cc"
+ (match_code "eq,ne,le,lt,ge,gt,geu,gtu,leu,ltu,unordered,
+ ordered,unlt,unle,unge,ungt")
+{
+ rtx ccreg = XEXP (op, 0);
+ enum machine_mode ccmode = GET_MODE (ccreg);
+
+ if (GET_MODE_CLASS (ccmode) == MODE_CC)
+ gcc_assert (XEXP (op, 1) == const0_rtx);
+ else if (ccmode == QImode || ccmode == HImode)
+ return false;
+
+ return true;
+})
+
(define_special_predicate "aarch64_equality_operator"
(match_code "eq,ne"))