Add rules for lowering `cbranch<mode>4` to CBB<cond>/CBH<cond>/CB<cond> when CMPBR extension is enabled.
gcc/ChangeLog: * config/aarch64/aarch64-protos.h (aarch64_cb_rhs): New function. * config/aarch64/aarch64.cc (aarch64_cb_rhs): Likewise. * config/aarch64/aarch64.md (cbranch<mode>4): Rename to ... (cbranch<GPI:mode>4): ...here, and emit CMPBR if possible. (cbranch<SHORT:mode>4): New expand rule. (aarch64_cb<INT_CMP:code><GPI:mode>): New insn rule. (aarch64_cb<INT_CMP:code><SHORT:mode>): Likewise. * config/aarch64/constraints.md (Uc0): New constraint. (Uc1): Likewise. (Uc2): Likewise. * config/aarch64/iterators.md (cmpbr_suffix): New mode attr. (INT_CMP): New code iterator. (cmpbr_imm_constraint): New code attr. gcc/testsuite/ChangeLog: * gcc.target/aarch64/cmpbr.c: --- gcc/config/aarch64/aarch64-protos.h | 2 + gcc/config/aarch64/aarch64.cc | 33 ++ gcc/config/aarch64/aarch64.md | 95 +++- gcc/config/aarch64/constraints.md | 18 + gcc/config/aarch64/iterators.md | 30 ++ gcc/testsuite/gcc.target/aarch64/cmpbr.c | 587 ++++++++--------------- 6 files changed, 379 insertions(+), 386 deletions(-) diff --git a/gcc/config/aarch64/aarch64-protos.h b/gcc/config/aarch64/aarch64-protos.h index 31f2f5b8bd2..e946e8da11d 100644 --- a/gcc/config/aarch64/aarch64-protos.h +++ b/gcc/config/aarch64/aarch64-protos.h @@ -1135,6 +1135,8 @@ bool aarch64_general_check_builtin_call (location_t, vec<location_t>, unsigned int, tree, unsigned int, tree *); +bool aarch64_cb_rhs (rtx_code op_code, rtx rhs); + namespace aarch64 { void report_non_ice (location_t, tree, unsigned int); void report_out_of_range (location_t, tree, unsigned int, HOST_WIDE_INT, diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc index 2cd03b941bd..f3ce3a15b09 100644 --- a/gcc/config/aarch64/aarch64.cc +++ b/gcc/config/aarch64/aarch64.cc @@ -959,6 +959,39 @@ svpattern_token (enum aarch64_svpattern pattern) gcc_unreachable (); } +/* Return true if RHS is an operand suitable for a CB<cc> (immediate) + instruction. OP_CODE determines the type of the comparison. */ +bool +aarch64_cb_rhs (rtx_code op_code, rtx rhs) +{ + if (!CONST_INT_P (rhs)) + return REG_P (rhs); + + HOST_WIDE_INT rhs_val = INTVAL (rhs); + + switch (op_code) + { + case EQ: + case NE: + case GT: + case GTU: + case LT: + case LTU: + return IN_RANGE (rhs_val, 0, 63); + + case GE: /* CBGE: signed greater than or equal */ + case GEU: /* CBHS: unsigned greater than or equal */ + return IN_RANGE (rhs_val, 1, 64); + + case LE: /* CBLE: signed less than or equal */ + case LEU: /* CBLS: unsigned less than or equal */ + return IN_RANGE (rhs_val, -1, 62); + + default: + return false; + } +} + /* Return the location of a piece that is known to be passed or returned in registers. FIRST_ZR is the first unused vector argument register and FIRST_PR is the first unused predicate argument register. */ diff --git a/gcc/config/aarch64/aarch64.md b/gcc/config/aarch64/aarch64.md index 1ff887a977e..32e0f739ae5 100644 --- a/gcc/config/aarch64/aarch64.md +++ b/gcc/config/aarch64/aarch64.md @@ -717,6 +717,10 @@ (define_constants ;; +/- 32KiB. Used by TBZ, TBNZ. (BRANCH_LEN_P_32KiB 32764) (BRANCH_LEN_N_32KiB -32768) + + ;; +/- 1KiB. Used by CBB<cond>, CBH<cond>, CB<cond>. + (BRANCH_LEN_P_1Kib 1020) + (BRANCH_LEN_N_1Kib -1024) ] ) @@ -724,18 +728,35 @@ (define_constants ;; Conditional jumps ;; ------------------------------------------------------------------- -(define_expand "cbranch<mode>4" +(define_expand "cbranch<GPI:mode>4" [(set (pc) (if_then_else (match_operator 0 "aarch64_comparison_operator" [(match_operand:GPI 1 "register_operand") (match_operand:GPI 2 "aarch64_plus_operand")]) (label_ref (match_operand 3)) (pc)))] "" - " - operands[1] = aarch64_gen_compare_reg (GET_CODE (operands[0]), operands[1], - operands[2]); - operands[2] = const0_rtx; - " + { + if (TARGET_CMPBR && aarch64_cb_rhs (GET_CODE (operands[0]), operands[2])) + { + /* Fall-through to `aarch64_cb<INT_CMP:code><GPI:mode>`. */ + } + else + { + operands[1] = aarch64_gen_compare_reg (GET_CODE (operands[0]), + operands[1], operands[2]); + operands[2] = const0_rtx; + } + } +) + +(define_expand "cbranch<SHORT:mode>4" + [(set (pc) (if_then_else (match_operator 0 "aarch64_comparison_operator" + [(match_operand:SHORT 1 "register_operand") + (match_operand:SHORT 2 "aarch64_reg_or_zero")]) + (label_ref (match_operand 3)) + (pc)))] + "TARGET_CMPBR" + "" ) (define_expand "cbranch<mode>4" @@ -763,6 +784,68 @@ (define_expand "cbranchcc4" "" ) +;; Emit a `CB<cond> (register)` or `CB<cond> (immediate)` instruction. +;; The immediate range depends on the comparison code. +;; Comparisons against immediates outside this range fall back to +;; CMP + B<cond>. +(define_insn "aarch64_cb<INT_CMP:code><GPI:mode>" + [(set (pc) (if_then_else (INT_CMP + (match_operand:GPI 0 "register_operand" "r") + (match_operand:GPI 1 "nonmemory_operand" + "r<INT_CMP:cmpbr_imm_constraint>")) + (label_ref (match_operand 2)) + (pc)))] + "TARGET_CMPBR && aarch64_cb_rhs (<INT_CMP:CODE>, operands[1])" + { + if (get_attr_far_branch (insn) == FAR_BRANCH_YES) + return aarch64_gen_far_branch (operands, 2, "L", + "cb<INT_CMP:inv_cmp_op>\\t%<w>0, %<w>1, "); + else + return "cb<INT_CMP:cmp_op>\\t%<w>0, %<w>1, %l2"; + } + [(set_attr "type" "branch") + (set (attr "length") + (if_then_else (and (ge (minus (match_dup 2) (pc)) + (const_int BRANCH_LEN_N_1Kib)) + (lt (minus (match_dup 2) (pc)) + (const_int BRANCH_LEN_P_1Kib))) + (const_int 4) + (const_int 8))) + (set (attr "far_branch") + (if_then_else (and (ge (minus (match_dup 2) (pc)) + (const_int BRANCH_LEN_N_1Kib)) + (lt (minus (match_dup 2) (pc)) + (const_int BRANCH_LEN_P_1Kib))) + (const_string "no") + (const_string "yes")))] +) + +;; Emit a `CBB<cond> (register)` or `CBH<cond> (register)` instruction. +(define_insn "aarch64_cb<INT_CMP:code><SHORT:mode>" + [(set (pc) (if_then_else (INT_CMP + (match_operand:SHORT 0 "register_operand" "r") + (match_operand:SHORT 1 "aarch64_reg_or_zero" "rZ")) + (label_ref (match_operand 2)) + (pc)))] + "TARGET_CMPBR" + "cb<SHORT:cmpbr_suffix><INT_CMP:cmp_op>\\t%<w>0, %<w>1, %l2" + [(set_attr "type" "branch") + (set (attr "length") + (if_then_else (and (ge (minus (match_dup 2) (pc)) + (const_int BRANCH_LEN_N_1Kib)) + (lt (minus (match_dup 2) (pc)) + (const_int BRANCH_LEN_P_1Kib))) + (const_int 4) + (const_int 8))) + (set (attr "far_branch") + (if_then_else (and (ge (minus (match_dup 2) (pc)) + (const_int BRANCH_LEN_N_1Kib)) + (lt (minus (match_dup 2) (pc)) + (const_int BRANCH_LEN_P_1Kib))) + (const_string "no") + (const_string "yes")))] +) + ;; Emit `B<cond>`, assuming that the condition is already in the CC register. (define_insn "aarch64_bcond" [(set (pc) (if_then_else (match_operator 0 "aarch64_comparison_operator" diff --git a/gcc/config/aarch64/constraints.md b/gcc/config/aarch64/constraints.md index e9f69f823a6..dc1925dfb6c 100644 --- a/gcc/config/aarch64/constraints.md +++ b/gcc/config/aarch64/constraints.md @@ -304,6 +304,24 @@ (define_constraint "Ui7" (and (match_code "const_int") (match_test "(unsigned HOST_WIDE_INT) ival <= 7"))) +(define_constraint "Uc0" + "@internal + A constraint that matches the integers 0...63." + (and (match_code "const_int") + (match_test "IN_RANGE (ival, 0, 63)"))) + +(define_constraint "Uc1" + "@internal + A constraint that matches the integers 1...64." + (and (match_code "const_int") + (match_test "IN_RANGE (ival, 1, 64)"))) + +(define_constraint "Uc2" + "@internal + A constraint that matches the integers -1...62." + (and (match_code "const_int") + (match_test "IN_RANGE (ival, -1, 62)"))) + (define_constraint "Up3" "@internal A constraint that matches the integers 2^(0...4)." diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md index a8957681357..c59fcd679d7 100644 --- a/gcc/config/aarch64/iterators.md +++ b/gcc/config/aarch64/iterators.md @@ -2961,6 +2961,36 @@ (define_code_attr cmp_op [(lt "lt") (geu "hs") (gtu "hi")]) +(define_code_attr inv_cmp_op [(lt "ge") + (le "gt") + (eq "ne") + (ne "eq") + (ge "lt") + (gt "le") + (ltu "hs") + (leu "hi") + (geu "lo") + (gtu "ls")]) + +(define_mode_attr cmpbr_suffix [(QI "b") (HI "h")]) + +(define_code_iterator INT_CMP [lt le eq ne ge gt ltu leu geu gtu]) + +(define_code_attr cmpbr_imm_constraint [ + (eq "Uc0") + (ne "Uc0") + (gt "Uc0") + (gtu "Uc0") + (lt "Uc0") + (ltu "Uc0") + + (ge "Uc1") + (geu "Uc1") + + (le "Uc2") + (leu "Uc2") +]) + (define_code_attr fix_trunc_optab [(fix "fix_trunc") (unsigned_fix "fixuns_trunc")]) diff --git a/gcc/testsuite/gcc.target/aarch64/cmpbr.c b/gcc/testsuite/gcc.target/aarch64/cmpbr.c index 9ca376a8f33..0fe5641fc07 100644 --- a/gcc/testsuite/gcc.target/aarch64/cmpbr.c +++ b/gcc/testsuite/gcc.target/aarch64/cmpbr.c @@ -108,9 +108,7 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_eq_x1: -** and w1, w1, 255 -** cmp w1, w0, uxtb -** beq .L4 +** cbbeq w1, w0, .L4 ** b not_taken ** .L4: ** b taken @@ -118,9 +116,7 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_ne_x1: -** and w1, w1, 255 -** cmp w1, w0, uxtb -** beq .L6 +** cbbeq w1, w0, .L6 ** b taken ** .L6: ** b not_taken @@ -128,9 +124,7 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_ult_x1: -** and w1, w1, 255 -** cmp w1, w0, uxtb -** bls .L8 +** cbbls w1, w0, .L8 ** b taken ** .L8: ** b not_taken @@ -138,9 +132,7 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_ule_x1: -** and w1, w1, 255 -** cmp w1, w0, uxtb -** bcc .L10 +** cbblo w1, w0, .L10 ** b taken ** .L10: ** b not_taken @@ -148,9 +140,7 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_ugt_x1: -** and w1, w1, 255 -** cmp w1, w0, uxtb -** bcs .L12 +** cbbhs w1, w0, .L12 ** b taken ** .L12: ** b not_taken @@ -158,9 +148,7 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_uge_x1: -** and w1, w1, 255 -** cmp w1, w0, uxtb -** bhi .L14 +** cbbhi w1, w0, .L14 ** b taken ** .L14: ** b not_taken @@ -168,9 +156,7 @@ int far_branch(i32 x, i32 y) { /* ** i8_x0_slt_x1: -** sxtb w1, w1 -** cmp w1, w0, sxtb -** ble .L16 +** cbble w1, w0, .L16 ** b taken ** .L16: ** b not_taken @@ -178,9 +164,7 @@ int far_branch(i32 x, i32 y) { /* ** i8_x0_sle_x1: -** sxtb w1, w1 -** cmp w1, w0, sxtb -** blt .L18 +** cbblt w1, w0, .L18 ** b taken ** .L18: ** b not_taken @@ -188,9 +172,7 @@ int far_branch(i32 x, i32 y) { /* ** i8_x0_sgt_x1: -** sxtb w1, w1 -** cmp w1, w0, sxtb -** bge .L20 +** cbbge w1, w0, .L20 ** b taken ** .L20: ** b not_taken @@ -198,9 +180,7 @@ int far_branch(i32 x, i32 y) { /* ** i8_x0_sge_x1: -** sxtb w1, w1 -** cmp w1, w0, sxtb -** bgt .L22 +** cbbgt w1, w0, .L22 ** b taken ** .L22: ** b not_taken @@ -208,9 +188,7 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_eq_x1: -** and w1, w1, 65535 -** cmp w1, w0, uxth -** beq .L25 +** cbheq w1, w0, .L25 ** b not_taken ** .L25: ** b taken @@ -218,9 +196,7 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ne_x1: -** and w1, w1, 65535 -** cmp w1, w0, uxth -** beq .L27 +** cbheq w1, w0, .L27 ** b taken ** .L27: ** b not_taken @@ -228,9 +204,7 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ult_x1: -** and w1, w1, 65535 -** cmp w1, w0, uxth -** bls .L29 +** cbhls w1, w0, .L29 ** b taken ** .L29: ** b not_taken @@ -238,9 +212,7 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ule_x1: -** and w1, w1, 65535 -** cmp w1, w0, uxth -** bcc .L31 +** cbhlo w1, w0, .L31 ** b taken ** .L31: ** b not_taken @@ -248,9 +220,7 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ugt_x1: -** and w1, w1, 65535 -** cmp w1, w0, uxth -** bcs .L33 +** cbhhs w1, w0, .L33 ** b taken ** .L33: ** b not_taken @@ -258,9 +228,7 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_uge_x1: -** and w1, w1, 65535 -** cmp w1, w0, uxth -** bhi .L35 +** cbhhi w1, w0, .L35 ** b taken ** .L35: ** b not_taken @@ -268,9 +236,7 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_slt_x1: -** sxth w1, w1 -** cmp w1, w0, sxth -** ble .L37 +** cbhle w1, w0, .L37 ** b taken ** .L37: ** b not_taken @@ -278,9 +244,7 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_sle_x1: -** sxth w1, w1 -** cmp w1, w0, sxth -** blt .L39 +** cbhlt w1, w0, .L39 ** b taken ** .L39: ** b not_taken @@ -288,9 +252,7 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_sgt_x1: -** sxth w1, w1 -** cmp w1, w0, sxth -** bge .L41 +** cbhge w1, w0, .L41 ** b taken ** .L41: ** b not_taken @@ -298,9 +260,7 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_sge_x1: -** sxth w1, w1 -** cmp w1, w0, sxth -** bgt .L43 +** cbhgt w1, w0, .L43 ** b taken ** .L43: ** b not_taken @@ -308,8 +268,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_eq_x1: -** cmp w0, w1 -** beq .L46 +** cbeq w0, w1, .L46 ** b not_taken ** .L46: ** b taken @@ -317,8 +276,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_ne_x1: -** cmp w0, w1 -** beq .L48 +** cbeq w0, w1, .L48 ** b taken ** .L48: ** b not_taken @@ -326,8 +284,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_ult_x1: -** cmp w0, w1 -** bcs .L50 +** cbhs w0, w1, .L50 ** b taken ** .L50: ** b not_taken @@ -335,8 +292,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_ule_x1: -** cmp w0, w1 -** bhi .L52 +** cbhi w0, w1, .L52 ** b taken ** .L52: ** b not_taken @@ -344,8 +300,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_ugt_x1: -** cmp w0, w1 -** bls .L54 +** cbls w0, w1, .L54 ** b taken ** .L54: ** b not_taken @@ -353,8 +308,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_uge_x1: -** cmp w0, w1 -** bcc .L56 +** cblo w0, w1, .L56 ** b taken ** .L56: ** b not_taken @@ -362,8 +316,7 @@ int far_branch(i32 x, i32 y) { /* ** i32_x0_slt_x1: -** cmp w0, w1 -** bge .L58 +** cbge w0, w1, .L58 ** b taken ** .L58: ** b not_taken @@ -371,8 +324,7 @@ int far_branch(i32 x, i32 y) { /* ** i32_x0_sle_x1: -** cmp w0, w1 -** bgt .L60 +** cbgt w0, w1, .L60 ** b taken ** .L60: ** b not_taken @@ -380,8 +332,7 @@ int far_branch(i32 x, i32 y) { /* ** i32_x0_sgt_x1: -** cmp w0, w1 -** ble .L62 +** cble w0, w1, .L62 ** b taken ** .L62: ** b not_taken @@ -389,8 +340,7 @@ int far_branch(i32 x, i32 y) { /* ** i32_x0_sge_x1: -** cmp w0, w1 -** blt .L64 +** cblt w0, w1, .L64 ** b taken ** .L64: ** b not_taken @@ -398,8 +348,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_eq_x1: -** cmp x0, x1 -** beq .L67 +** cbeq x0, x1, .L67 ** b not_taken ** .L67: ** b taken @@ -407,8 +356,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_ne_x1: -** cmp x0, x1 -** beq .L69 +** cbeq x0, x1, .L69 ** b taken ** .L69: ** b not_taken @@ -416,8 +364,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_ult_x1: -** cmp x0, x1 -** bcs .L71 +** cbhs x0, x1, .L71 ** b taken ** .L71: ** b not_taken @@ -425,8 +372,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_ule_x1: -** cmp x0, x1 -** bhi .L73 +** cbhi x0, x1, .L73 ** b taken ** .L73: ** b not_taken @@ -434,8 +380,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_ugt_x1: -** cmp x0, x1 -** bls .L75 +** cbls x0, x1, .L75 ** b taken ** .L75: ** b not_taken @@ -443,8 +388,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_uge_x1: -** cmp x0, x1 -** bcc .L77 +** cblo x0, x1, .L77 ** b taken ** .L77: ** b not_taken @@ -452,8 +396,7 @@ int far_branch(i32 x, i32 y) { /* ** i64_x0_slt_x1: -** cmp x0, x1 -** bge .L79 +** cbge x0, x1, .L79 ** b taken ** .L79: ** b not_taken @@ -461,8 +404,7 @@ int far_branch(i32 x, i32 y) { /* ** i64_x0_sle_x1: -** cmp x0, x1 -** bgt .L81 +** cbgt x0, x1, .L81 ** b taken ** .L81: ** b not_taken @@ -470,8 +412,7 @@ int far_branch(i32 x, i32 y) { /* ** i64_x0_sgt_x1: -** cmp x0, x1 -** ble .L83 +** cble x0, x1, .L83 ** b taken ** .L83: ** b not_taken @@ -479,8 +420,7 @@ int far_branch(i32 x, i32 y) { /* ** i64_x0_sge_x1: -** cmp x0, x1 -** blt .L85 +** cblt x0, x1, .L85 ** b taken ** .L85: ** b not_taken @@ -488,8 +428,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_eq_42: -** cmp w0, 42 -** beq .L88 +** cbeq w0, 42, .L88 ** b not_taken ** .L88: ** b taken @@ -497,8 +436,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_ne_42: -** cmp w0, 42 -** beq .L90 +** cbeq w0, 42, .L90 ** b taken ** .L90: ** b not_taken @@ -506,8 +444,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_ult_42: -** cmp w0, 41 -** bhi .L92 +** cbhi w0, 41, .L92 ** b taken ** .L92: ** b not_taken @@ -515,8 +452,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_ule_42: -** cmp w0, 42 -** bhi .L94 +** cbhi w0, 42, .L94 ** b taken ** .L94: ** b not_taken @@ -524,8 +460,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_ugt_42: -** cmp w0, 42 -** bls .L96 +** cbls w0, 42, .L96 ** b taken ** .L96: ** b not_taken @@ -533,8 +468,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_uge_42: -** cmp w0, 41 -** bls .L98 +** cbls w0, 41, .L98 ** b taken ** .L98: ** b not_taken @@ -542,8 +476,7 @@ int far_branch(i32 x, i32 y) { /* ** i32_x0_slt_42: -** cmp w0, 41 -** bgt .L100 +** cbgt w0, 41, .L100 ** b taken ** .L100: ** b not_taken @@ -551,8 +484,7 @@ int far_branch(i32 x, i32 y) { /* ** i32_x0_sle_42: -** cmp w0, 42 -** bgt .L102 +** cbgt w0, 42, .L102 ** b taken ** .L102: ** b not_taken @@ -560,8 +492,7 @@ int far_branch(i32 x, i32 y) { /* ** i32_x0_sgt_42: -** cmp w0, 42 -** ble .L104 +** cble w0, 42, .L104 ** b taken ** .L104: ** b not_taken @@ -569,8 +500,7 @@ int far_branch(i32 x, i32 y) { /* ** i32_x0_sge_42: -** cmp w0, 41 -** ble .L106 +** cble w0, 41, .L106 ** b taken ** .L106: ** b not_taken @@ -578,8 +508,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_eq_42: -** cmp x0, 42 -** beq .L109 +** cbeq x0, 42, .L109 ** b not_taken ** .L109: ** b taken @@ -587,8 +516,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_ne_42: -** cmp x0, 42 -** beq .L111 +** cbeq x0, 42, .L111 ** b taken ** .L111: ** b not_taken @@ -596,8 +524,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_ult_42: -** cmp x0, 41 -** bhi .L113 +** cbhi x0, 41, .L113 ** b taken ** .L113: ** b not_taken @@ -605,8 +532,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_ule_42: -** cmp x0, 42 -** bhi .L115 +** cbhi x0, 42, .L115 ** b taken ** .L115: ** b not_taken @@ -614,8 +540,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_ugt_42: -** cmp x0, 42 -** bls .L117 +** cbls x0, 42, .L117 ** b taken ** .L117: ** b not_taken @@ -623,8 +548,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_uge_42: -** cmp x0, 41 -** bls .L119 +** cbls x0, 41, .L119 ** b taken ** .L119: ** b not_taken @@ -632,8 +556,7 @@ int far_branch(i32 x, i32 y) { /* ** i64_x0_slt_42: -** cmp x0, 41 -** bgt .L121 +** cbgt x0, 41, .L121 ** b taken ** .L121: ** b not_taken @@ -641,8 +564,7 @@ int far_branch(i32 x, i32 y) { /* ** i64_x0_sle_42: -** cmp x0, 42 -** bgt .L123 +** cbgt x0, 42, .L123 ** b taken ** .L123: ** b not_taken @@ -650,8 +572,7 @@ int far_branch(i32 x, i32 y) { /* ** i64_x0_sgt_42: -** cmp x0, 42 -** ble .L125 +** cble x0, 42, .L125 ** b taken ** .L125: ** b not_taken @@ -659,8 +580,7 @@ int far_branch(i32 x, i32 y) { /* ** i64_x0_sge_42: -** cmp x0, 41 -** ble .L127 +** cble x0, 41, .L127 ** b taken ** .L127: ** b not_taken @@ -668,8 +588,7 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_eq_0: -** tst w0, 255 -** bne .L129 +** cbbne w0, wzr, .L129 ** b taken ** .L129: ** b not_taken @@ -677,8 +596,7 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_ne_0: -** tst w0, 255 -** beq .L131 +** cbbeq w0, wzr, .L131 ** b taken ** .L131: ** b not_taken @@ -691,8 +609,7 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_ule_0: -** tst w0, 255 -** bne .L134 +** cbbne w0, wzr, .L134 ** b taken ** .L134: ** b not_taken @@ -700,8 +617,7 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_ugt_0: -** tst w0, 255 -** beq .L136 +** cbbeq w0, wzr, .L136 ** b taken ** .L136: ** b not_taken @@ -714,7 +630,7 @@ int far_branch(i32 x, i32 y) { /* ** i8_x0_slt_0: -** tbnz w0, 7, .L140 +** cbblt w0, wzr, .L140 ** b not_taken ** .L140: ** b taken @@ -722,9 +638,7 @@ int far_branch(i32 x, i32 y) { /* ** i8_x0_sle_0: -** sxtb w0, w0 -** cmp w0, 0 -** ble .L143 +** cbble w0, wzr, .L143 ** b not_taken ** .L143: ** b taken @@ -732,9 +646,7 @@ int far_branch(i32 x, i32 y) { /* ** i8_x0_sgt_0: -** sxtb w0, w0 -** cmp w0, 0 -** ble .L145 +** cbble w0, wzr, .L145 ** b taken ** .L145: ** b not_taken @@ -742,7 +654,7 @@ int far_branch(i32 x, i32 y) { /* ** i8_x0_sge_0: -** tbnz w0, 7, .L147 +** cbblt w0, wzr, .L147 ** b taken ** .L147: ** b not_taken @@ -750,8 +662,7 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_eq_0: -** tst w0, 65535 -** bne .L149 +** cbhne w0, wzr, .L149 ** b taken ** .L149: ** b not_taken @@ -759,8 +670,7 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ne_0: -** tst w0, 65535 -** beq .L151 +** cbheq w0, wzr, .L151 ** b taken ** .L151: ** b not_taken @@ -773,8 +683,7 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ule_0: -** tst w0, 65535 -** bne .L154 +** cbhne w0, wzr, .L154 ** b taken ** .L154: ** b not_taken @@ -782,8 +691,7 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ugt_0: -** tst w0, 65535 -** beq .L156 +** cbheq w0, wzr, .L156 ** b taken ** .L156: ** b not_taken @@ -796,7 +704,7 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_slt_0: -** tbnz w0, 15, .L160 +** cbhlt w0, wzr, .L160 ** b not_taken ** .L160: ** b taken @@ -804,9 +712,7 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_sle_0: -** sxth w0, w0 -** cmp w0, 0 -** ble .L163 +** cbhle w0, wzr, .L163 ** b not_taken ** .L163: ** b taken @@ -814,9 +720,7 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_sgt_0: -** sxth w0, w0 -** cmp w0, 0 -** ble .L165 +** cbhle w0, wzr, .L165 ** b taken ** .L165: ** b not_taken @@ -824,7 +728,7 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_sge_0: -** tbnz w0, 15, .L167 +** cbhlt w0, wzr, .L167 ** b taken ** .L167: ** b not_taken @@ -832,7 +736,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_eq_0: -** cbnz w0, .L169 +** cbne w0, wzr, .L169 ** b taken ** .L169: ** b not_taken @@ -840,7 +744,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_ne_0: -** cbz w0, .L171 +** cbeq w0, wzr, .L171 ** b taken ** .L171: ** b not_taken @@ -853,7 +757,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_ule_0: -** cbnz w0, .L174 +** cbne w0, wzr, .L174 ** b taken ** .L174: ** b not_taken @@ -861,7 +765,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_ugt_0: -** cbz w0, .L176 +** cbeq w0, wzr, .L176 ** b taken ** .L176: ** b not_taken @@ -882,8 +786,7 @@ int far_branch(i32 x, i32 y) { /* ** i32_x0_sle_0: -** cmp w0, 0 -** ble .L183 +** cble w0, wzr, .L183 ** b not_taken ** .L183: ** b taken @@ -891,8 +794,7 @@ int far_branch(i32 x, i32 y) { /* ** i32_x0_sgt_0: -** cmp w0, 0 -** ble .L185 +** cble w0, wzr, .L185 ** b taken ** .L185: ** b not_taken @@ -900,7 +802,7 @@ int far_branch(i32 x, i32 y) { /* ** i32_x0_sge_0: -** tbnz w0, #31, .L187 +** cblt w0, wzr, .L187 ** b taken ** .L187: ** b not_taken @@ -908,7 +810,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_eq_0: -** cbnz x0, .L189 +** cbne x0, xzr, .L189 ** b taken ** .L189: ** b not_taken @@ -916,7 +818,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_ne_0: -** cbz x0, .L191 +** cbeq x0, xzr, .L191 ** b taken ** .L191: ** b not_taken @@ -929,7 +831,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_ule_0: -** cbnz x0, .L194 +** cbne x0, xzr, .L194 ** b taken ** .L194: ** b not_taken @@ -937,7 +839,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_ugt_0: -** cbz x0, .L196 +** cbeq x0, xzr, .L196 ** b taken ** .L196: ** b not_taken @@ -958,8 +860,7 @@ int far_branch(i32 x, i32 y) { /* ** i64_x0_sle_0: -** cmp x0, 0 -** ble .L203 +** cble x0, xzr, .L203 ** b not_taken ** .L203: ** b taken @@ -967,8 +868,7 @@ int far_branch(i32 x, i32 y) { /* ** i64_x0_sgt_0: -** cmp x0, 0 -** ble .L205 +** cble x0, xzr, .L205 ** b taken ** .L205: ** b not_taken @@ -976,7 +876,7 @@ int far_branch(i32 x, i32 y) { /* ** i64_x0_sge_0: -** tbnz x0, #63, .L207 +** cblt x0, xzr, .L207 ** b taken ** .L207: ** b not_taken @@ -984,9 +884,8 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_eq_42: -** and w0, w0, 255 -** cmp w0, 42 -** beq .L210 +** mov w1, 42 +** cbbeq w0, w1, .L210 ** b not_taken ** .L210: ** b taken @@ -994,9 +893,8 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_ne_42: -** and w0, w0, 255 -** cmp w0, 42 -** beq .L212 +** mov w1, 42 +** cbbeq w0, w1, .L212 ** b taken ** .L212: ** b not_taken @@ -1004,9 +902,8 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_ult_42: -** and w0, w0, 255 -** cmp w0, 41 -** bhi .L214 +** mov w1, 41 +** cbbhi w0, w1, .L214 ** b taken ** .L214: ** b not_taken @@ -1014,9 +911,8 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_ule_42: -** and w0, w0, 255 -** cmp w0, 42 -** bhi .L216 +** mov w1, 42 +** cbbhi w0, w1, .L216 ** b taken ** .L216: ** b not_taken @@ -1024,9 +920,8 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_ugt_42: -** and w0, w0, 255 -** cmp w0, 42 -** bls .L218 +** mov w1, 42 +** cbbls w0, w1, .L218 ** b taken ** .L218: ** b not_taken @@ -1034,9 +929,8 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_uge_42: -** and w0, w0, 255 -** cmp w0, 41 -** bls .L220 +** mov w1, 41 +** cbbls w0, w1, .L220 ** b taken ** .L220: ** b not_taken @@ -1044,9 +938,8 @@ int far_branch(i32 x, i32 y) { /* ** i8_x0_slt_42: -** sxtb w0, w0 -** cmp w0, 41 -** bgt .L222 +** mov w1, 41 +** cbbgt w0, w1, .L222 ** b taken ** .L222: ** b not_taken @@ -1054,9 +947,8 @@ int far_branch(i32 x, i32 y) { /* ** i8_x0_sle_42: -** sxtb w0, w0 -** cmp w0, 42 -** bgt .L224 +** mov w1, 42 +** cbbgt w0, w1, .L224 ** b taken ** .L224: ** b not_taken @@ -1064,9 +956,8 @@ int far_branch(i32 x, i32 y) { /* ** i8_x0_sgt_42: -** sxtb w0, w0 -** cmp w0, 42 -** ble .L226 +** mov w1, 42 +** cbble w0, w1, .L226 ** b taken ** .L226: ** b not_taken @@ -1074,9 +965,8 @@ int far_branch(i32 x, i32 y) { /* ** i8_x0_sge_42: -** sxtb w0, w0 -** cmp w0, 41 -** ble .L228 +** mov w1, 41 +** cbble w0, w1, .L228 ** b taken ** .L228: ** b not_taken @@ -1084,9 +974,8 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_eq_42: -** and w0, w0, 65535 -** cmp w0, 42 -** beq .L231 +** mov w1, 42 +** cbheq w0, w1, .L231 ** b not_taken ** .L231: ** b taken @@ -1094,9 +983,8 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ne_42: -** and w0, w0, 65535 -** cmp w0, 42 -** beq .L233 +** mov w1, 42 +** cbheq w0, w1, .L233 ** b taken ** .L233: ** b not_taken @@ -1104,9 +992,8 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ult_42: -** and w0, w0, 65535 -** cmp w0, 41 -** bhi .L235 +** mov w1, 41 +** cbhhi w0, w1, .L235 ** b taken ** .L235: ** b not_taken @@ -1114,9 +1001,8 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ule_42: -** and w0, w0, 65535 -** cmp w0, 42 -** bhi .L237 +** mov w1, 42 +** cbhhi w0, w1, .L237 ** b taken ** .L237: ** b not_taken @@ -1124,9 +1010,8 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ugt_42: -** and w0, w0, 65535 -** cmp w0, 42 -** bls .L239 +** mov w1, 42 +** cbhls w0, w1, .L239 ** b taken ** .L239: ** b not_taken @@ -1134,9 +1019,8 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_uge_42: -** and w0, w0, 65535 -** cmp w0, 41 -** bls .L241 +** mov w1, 41 +** cbhls w0, w1, .L241 ** b taken ** .L241: ** b not_taken @@ -1144,9 +1028,8 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_slt_42: -** sxth w0, w0 -** cmp w0, 41 -** bgt .L243 +** mov w1, 41 +** cbhgt w0, w1, .L243 ** b taken ** .L243: ** b not_taken @@ -1154,9 +1037,8 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_sle_42: -** sxth w0, w0 -** cmp w0, 42 -** bgt .L245 +** mov w1, 42 +** cbhgt w0, w1, .L245 ** b taken ** .L245: ** b not_taken @@ -1164,9 +1046,8 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_sgt_42: -** sxth w0, w0 -** cmp w0, 42 -** ble .L247 +** mov w1, 42 +** cbhle w0, w1, .L247 ** b taken ** .L247: ** b not_taken @@ -1174,9 +1055,8 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_sge_42: -** sxth w0, w0 -** cmp w0, 41 -** ble .L249 +** mov w1, 41 +** cbhle w0, w1, .L249 ** b taken ** .L249: ** b not_taken @@ -1184,9 +1064,8 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_eq_64: -** and w0, w0, 255 -** cmp w0, 64 -** beq .L252 +** mov w1, 64 +** cbbeq w0, w1, .L252 ** b not_taken ** .L252: ** b taken @@ -1194,9 +1073,8 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_ne_64: -** and w0, w0, 255 -** cmp w0, 64 -** beq .L254 +** mov w1, 64 +** cbbeq w0, w1, .L254 ** b taken ** .L254: ** b not_taken @@ -1204,9 +1082,8 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_ult_64: -** and w0, w0, 255 -** cmp w0, 63 -** bhi .L256 +** mov w1, 63 +** cbbhi w0, w1, .L256 ** b taken ** .L256: ** b not_taken @@ -1214,9 +1091,8 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_ule_64: -** and w0, w0, 255 -** cmp w0, 64 -** bhi .L258 +** mov w1, 64 +** cbbhi w0, w1, .L258 ** b taken ** .L258: ** b not_taken @@ -1224,9 +1100,8 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_ugt_64: -** and w0, w0, 255 -** cmp w0, 64 -** bls .L260 +** mov w1, 64 +** cbbls w0, w1, .L260 ** b taken ** .L260: ** b not_taken @@ -1234,9 +1109,8 @@ int far_branch(i32 x, i32 y) { /* ** u8_x0_uge_64: -** and w0, w0, 255 -** cmp w0, 63 -** bls .L262 +** mov w1, 63 +** cbbls w0, w1, .L262 ** b taken ** .L262: ** b not_taken @@ -1244,9 +1118,8 @@ int far_branch(i32 x, i32 y) { /* ** i8_x0_slt_64: -** sxtb w0, w0 -** cmp w0, 63 -** bgt .L264 +** mov w1, 63 +** cbbgt w0, w1, .L264 ** b taken ** .L264: ** b not_taken @@ -1254,9 +1127,8 @@ int far_branch(i32 x, i32 y) { /* ** i8_x0_sle_64: -** sxtb w0, w0 -** cmp w0, 64 -** bgt .L266 +** mov w1, 64 +** cbbgt w0, w1, .L266 ** b taken ** .L266: ** b not_taken @@ -1264,9 +1136,8 @@ int far_branch(i32 x, i32 y) { /* ** i8_x0_sgt_64: -** sxtb w0, w0 -** cmp w0, 64 -** ble .L268 +** mov w1, 64 +** cbble w0, w1, .L268 ** b taken ** .L268: ** b not_taken @@ -1274,9 +1145,8 @@ int far_branch(i32 x, i32 y) { /* ** i8_x0_sge_64: -** sxtb w0, w0 -** cmp w0, 63 -** ble .L270 +** mov w1, 63 +** cbble w0, w1, .L270 ** b taken ** .L270: ** b not_taken @@ -1284,9 +1154,8 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_eq_64: -** and w0, w0, 65535 -** cmp w0, 64 -** beq .L273 +** mov w1, 64 +** cbheq w0, w1, .L273 ** b not_taken ** .L273: ** b taken @@ -1294,9 +1163,8 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ne_64: -** and w0, w0, 65535 -** cmp w0, 64 -** beq .L275 +** mov w1, 64 +** cbheq w0, w1, .L275 ** b taken ** .L275: ** b not_taken @@ -1304,9 +1172,8 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ult_64: -** and w0, w0, 65535 -** cmp w0, 63 -** bhi .L277 +** mov w1, 63 +** cbhhi w0, w1, .L277 ** b taken ** .L277: ** b not_taken @@ -1314,9 +1181,8 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ule_64: -** and w0, w0, 65535 -** cmp w0, 64 -** bhi .L279 +** mov w1, 64 +** cbhhi w0, w1, .L279 ** b taken ** .L279: ** b not_taken @@ -1324,9 +1190,8 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ugt_64: -** and w0, w0, 65535 -** cmp w0, 64 -** bls .L281 +** mov w1, 64 +** cbhls w0, w1, .L281 ** b taken ** .L281: ** b not_taken @@ -1334,9 +1199,8 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_uge_64: -** and w0, w0, 65535 -** cmp w0, 63 -** bls .L283 +** mov w1, 63 +** cbhls w0, w1, .L283 ** b taken ** .L283: ** b not_taken @@ -1344,9 +1208,8 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_slt_64: -** sxth w0, w0 -** cmp w0, 63 -** bgt .L285 +** mov w1, 63 +** cbhgt w0, w1, .L285 ** b taken ** .L285: ** b not_taken @@ -1354,9 +1217,8 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_sle_64: -** sxth w0, w0 -** cmp w0, 64 -** bgt .L287 +** mov w1, 64 +** cbhgt w0, w1, .L287 ** b taken ** .L287: ** b not_taken @@ -1364,9 +1226,8 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_sgt_64: -** sxth w0, w0 -** cmp w0, 64 -** ble .L289 +** mov w1, 64 +** cbhle w0, w1, .L289 ** b taken ** .L289: ** b not_taken @@ -1374,9 +1235,8 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_sge_64: -** sxth w0, w0 -** cmp w0, 63 -** ble .L291 +** mov w1, 63 +** cbhle w0, w1, .L291 ** b taken ** .L291: ** b not_taken @@ -1402,8 +1262,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_ult_64: -** cmp w0, 63 -** bhi .L298 +** cbhi w0, 63, .L298 ** b taken ** .L298: ** b not_taken @@ -1438,8 +1297,7 @@ int far_branch(i32 x, i32 y) { /* ** i32_x0_slt_64: -** cmp w0, 63 -** bgt .L306 +** cbgt w0, 63, .L306 ** b taken ** .L306: ** b not_taken @@ -1492,8 +1350,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_ult_64: -** cmp x0, 63 -** bhi .L319 +** cbhi x0, 63, .L319 ** b taken ** .L319: ** b not_taken @@ -1528,8 +1385,7 @@ int far_branch(i32 x, i32 y) { /* ** i64_x0_slt_64: -** cmp x0, 63 -** bgt .L327 +** cbgt x0, 63, .L327 ** b taken ** .L327: ** b not_taken @@ -1565,8 +1421,7 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_eq_4098: ** mov w1, 4098 -** cmp w1, w0, uxth -** beq .L336 +** cbheq w0, w1, .L336 ** b not_taken ** .L336: ** b taken @@ -1575,8 +1430,7 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ne_4098: ** mov w1, 4098 -** cmp w1, w0, uxth -** beq .L338 +** cbheq w0, w1, .L338 ** b taken ** .L338: ** b not_taken @@ -1585,8 +1439,7 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ult_4098: ** mov w1, 4097 -** cmp w1, w0, uxth -** bcc .L340 +** cbhhi w0, w1, .L340 ** b taken ** .L340: ** b not_taken @@ -1595,8 +1448,7 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ule_4098: ** mov w1, 4098 -** cmp w1, w0, uxth -** bcc .L342 +** cbhhi w0, w1, .L342 ** b taken ** .L342: ** b not_taken @@ -1605,8 +1457,7 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_ugt_4098: ** mov w1, 4098 -** cmp w1, w0, uxth -** bcs .L344 +** cbhls w0, w1, .L344 ** b taken ** .L344: ** b not_taken @@ -1615,8 +1466,7 @@ int far_branch(i32 x, i32 y) { /* ** u16_x0_uge_4098: ** mov w1, 4097 -** cmp w1, w0, uxth -** bcs .L346 +** cbhls w0, w1, .L346 ** b taken ** .L346: ** b not_taken @@ -1625,8 +1475,7 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_slt_4098: ** mov w1, 4097 -** cmp w1, w0, sxth -** blt .L348 +** cbhgt w0, w1, .L348 ** b taken ** .L348: ** b not_taken @@ -1635,8 +1484,7 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_sle_4098: ** mov w1, 4098 -** cmp w1, w0, sxth -** blt .L350 +** cbhgt w0, w1, .L350 ** b taken ** .L350: ** b not_taken @@ -1645,8 +1493,7 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_sgt_4098: ** mov w1, 4098 -** cmp w1, w0, sxth -** bge .L352 +** cbhle w0, w1, .L352 ** b taken ** .L352: ** b not_taken @@ -1655,8 +1502,7 @@ int far_branch(i32 x, i32 y) { /* ** i16_x0_sge_4098: ** mov w1, 4097 -** cmp w1, w0, sxth -** bge .L354 +** cbhle w0, w1, .L354 ** b taken ** .L354: ** b not_taken @@ -1665,8 +1511,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_eq_4098: ** mov w1, 4098 -** cmp w0, w1 -** beq .L357 +** cbeq w0, w1, .L357 ** b not_taken ** .L357: ** b taken @@ -1675,8 +1520,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_ne_4098: ** mov w1, 4098 -** cmp w0, w1 -** beq .L359 +** cbeq w0, w1, .L359 ** b taken ** .L359: ** b not_taken @@ -1685,8 +1529,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_ult_4098: ** mov w1, 4097 -** cmp w0, w1 -** bhi .L361 +** cbhi w0, w1, .L361 ** b taken ** .L361: ** b not_taken @@ -1695,8 +1538,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_ule_4098: ** mov w1, 4098 -** cmp w0, w1 -** bhi .L363 +** cbhi w0, w1, .L363 ** b taken ** .L363: ** b not_taken @@ -1705,8 +1547,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_ugt_4098: ** mov w1, 4098 -** cmp w0, w1 -** bls .L365 +** cbls w0, w1, .L365 ** b taken ** .L365: ** b not_taken @@ -1715,8 +1556,7 @@ int far_branch(i32 x, i32 y) { /* ** u32_x0_uge_4098: ** mov w1, 4097 -** cmp w0, w1 -** bls .L367 +** cbls w0, w1, .L367 ** b taken ** .L367: ** b not_taken @@ -1725,8 +1565,7 @@ int far_branch(i32 x, i32 y) { /* ** i32_x0_slt_4098: ** mov w1, 4097 -** cmp w0, w1 -** bgt .L369 +** cbgt w0, w1, .L369 ** b taken ** .L369: ** b not_taken @@ -1735,8 +1574,7 @@ int far_branch(i32 x, i32 y) { /* ** i32_x0_sle_4098: ** mov w1, 4098 -** cmp w0, w1 -** bgt .L371 +** cbgt w0, w1, .L371 ** b taken ** .L371: ** b not_taken @@ -1745,8 +1583,7 @@ int far_branch(i32 x, i32 y) { /* ** i32_x0_sgt_4098: ** mov w1, 4098 -** cmp w0, w1 -** ble .L373 +** cble w0, w1, .L373 ** b taken ** .L373: ** b not_taken @@ -1755,8 +1592,7 @@ int far_branch(i32 x, i32 y) { /* ** i32_x0_sge_4098: ** mov w1, 4097 -** cmp w0, w1 -** ble .L375 +** cble w0, w1, .L375 ** b taken ** .L375: ** b not_taken @@ -1765,8 +1601,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_eq_4098: ** mov x1, 4098 -** cmp x0, x1 -** beq .L378 +** cbeq x0, x1, .L378 ** b not_taken ** .L378: ** b taken @@ -1775,8 +1610,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_ne_4098: ** mov x1, 4098 -** cmp x0, x1 -** beq .L380 +** cbeq x0, x1, .L380 ** b taken ** .L380: ** b not_taken @@ -1785,8 +1619,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_ult_4098: ** mov x1, 4097 -** cmp x0, x1 -** bhi .L382 +** cbhi x0, x1, .L382 ** b taken ** .L382: ** b not_taken @@ -1795,8 +1628,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_ule_4098: ** mov x1, 4098 -** cmp x0, x1 -** bhi .L384 +** cbhi x0, x1, .L384 ** b taken ** .L384: ** b not_taken @@ -1805,8 +1637,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_ugt_4098: ** mov x1, 4098 -** cmp x0, x1 -** bls .L386 +** cbls x0, x1, .L386 ** b taken ** .L386: ** b not_taken @@ -1815,8 +1646,7 @@ int far_branch(i32 x, i32 y) { /* ** u64_x0_uge_4098: ** mov x1, 4097 -** cmp x0, x1 -** bls .L388 +** cbls x0, x1, .L388 ** b taken ** .L388: ** b not_taken @@ -1825,8 +1655,7 @@ int far_branch(i32 x, i32 y) { /* ** i64_x0_slt_4098: ** mov x1, 4097 -** cmp x0, x1 -** bgt .L390 +** cbgt x0, x1, .L390 ** b taken ** .L390: ** b not_taken @@ -1835,8 +1664,7 @@ int far_branch(i32 x, i32 y) { /* ** i64_x0_sle_4098: ** mov x1, 4098 -** cmp x0, x1 -** bgt .L392 +** cbgt x0, x1, .L392 ** b taken ** .L392: ** b not_taken @@ -1845,8 +1673,7 @@ int far_branch(i32 x, i32 y) { /* ** i64_x0_sgt_4098: ** mov x1, 4098 -** cmp x0, x1 -** ble .L394 +** cble x0, x1, .L394 ** b taken ** .L394: ** b not_taken @@ -1855,8 +1682,7 @@ int far_branch(i32 x, i32 y) { /* ** i64_x0_sge_4098: ** mov x1, 4097 -** cmp x0, x1 -** ble .L396 +** cble x0, x1, .L396 ** b taken ** .L396: ** b not_taken @@ -1866,8 +1692,9 @@ int far_branch(i32 x, i32 y) { ** far_branch: ** sub sp, sp, #16 ** str wzr, \[sp, 12\] -** cmp w0, w1 -** bne .L398 +** cbeq w0, w1, .L400 +** b .L398 +** .L400: ** str wzr, \[sp, 12\] ** ... ** str wzr, \[sp, 12\] -- 2.45.2