Lines Matching refs:cond
1409 ir_insn *cond = &ctx->ir_base[cond_ref]; in ir_optimize_phi() local
1414 is_cmp = (cond->op == IR_LT || cond->op == IR_LE || cond->op == IR_GT || cond->op == IR_GE || in ir_optimize_phi()
1415 cond->op == IR_ULT || cond->op == IR_ULE || cond->op == IR_UGT || cond->op == IR_UGE); in ir_optimize_phi()
1416 is_less = (cond->op == IR_LT || cond->op == IR_LE || in ir_optimize_phi()
1417 cond->op == IR_ULT || cond->op == IR_ULE); in ir_optimize_phi()
1419 is_cmp = (cond->op == IR_LT || cond->op == IR_LE || cond->op == IR_GT || cond->op == IR_GE); in ir_optimize_phi()
1420 is_less = (cond->op == IR_LT || cond->op == IR_LE); in ir_optimize_phi()
1423 … is_cmp = (cond->op == IR_ULT || cond->op == IR_ULE || cond->op == IR_UGT || cond->op == IR_UGE); in ir_optimize_phi()
1424 is_less = (cond->op == IR_ULT || cond->op == IR_ULE); in ir_optimize_phi()
1428 && ((insn->op2 == cond->op1 && insn->op3 == cond->op2) in ir_optimize_phi()
1429 || (insn->op2 == cond->op2 && insn->op3 == cond->op1))) { in ir_optimize_phi()
1461 (is_less ? cond->op1 : cond->op2) in ir_optimize_phi()
1483 MAKE_NOP(cond); CLEAR_USES(cond_ref); in ir_optimize_phi()
1500 && ((cond->op1 == insn->op3 in ir_optimize_phi()
1501 && ir_is_zero(ctx, cond->op2) in ir_optimize_phi()
1503 || (cond->op2 == insn->op3 in ir_optimize_phi()
1504 && ir_is_zero(ctx, cond->op1) in ir_optimize_phi()
1509 && ((cond->op1 == insn->op2 in ir_optimize_phi()
1510 && ir_is_zero(ctx, cond->op2) in ir_optimize_phi()
1512 || (cond->op2 == insn->op2 in ir_optimize_phi()
1513 && ir_is_zero(ctx, cond->op1) in ir_optimize_phi()
1565 MAKE_NOP(cond); CLEAR_USES(cond_ref); in ir_optimize_phi()
1745 ir_insn *cond = &ctx->ir_base[cond_ref]; in ir_try_split_if() local
1747 if (cond->op == IR_PHI in ir_try_split_if()
1748 && cond->inputs_count == 3 in ir_try_split_if()
1749 && cond->op1 == insn->op1 in ir_try_split_if()
1750 && ((IR_IS_CONST_REF(cond->op2) && !IR_IS_SYM_CONST(ctx->ir_base[cond->op2].op)) in ir_try_split_if()
1751 || (IR_IS_CONST_REF(cond->op3) && !IR_IS_SYM_CONST(ctx->ir_base[cond->op3].op)))) { in ir_try_split_if()
1767 if (!IR_IS_CONST_REF(cond->op2) || IR_IS_SYM_CONST(ctx->ir_base[cond->op2].op)) { in ir_try_split_if()
1768 IR_ASSERT(IR_IS_CONST_REF(cond->op3)); in ir_try_split_if()
1769 SWAP_REFS(cond->op2, cond->op3); in ir_try_split_if()
1774 if (ir_const_is_true(&ctx->ir_base[cond->op2])) { in ir_try_split_if()
1781 if (IR_IS_CONST_REF(cond->op3) && !IR_IS_SYM_CONST(ctx->ir_base[cond->op3].op)) { in ir_try_split_if()
1782 if (ir_const_is_true(&ctx->ir_base[cond->op3]) ^ (op == IR_IF_TRUE)) { in ir_try_split_if()
1805 MAKE_NOP(cond); CLEAR_USES(cond_ref); in ir_try_split_if()
1841 MAKE_NOP(cond); CLEAR_USES(cond_ref); in ir_try_split_if()
1879 if (!IR_IS_CONST_REF(cond->op3)) { in ir_try_split_if()
1880 ir_use_list_replace_one(ctx, cond->op3, cond_ref, end2_ref); in ir_try_split_if()
1886 end2->op2 = cond->op3; in ir_try_split_if()
1892 MAKE_NOP(cond); in ir_try_split_if()
1921 ir_insn *cond = &ctx->ir_base[cond_ref]; in ir_try_split_if_cmp() local
1923 if (cond->op >= IR_EQ && cond->op <= IR_UGT in ir_try_split_if_cmp()
1924 && IR_IS_CONST_REF(cond->op2) in ir_try_split_if_cmp()
1925 && !IR_IS_SYM_CONST(ctx->ir_base[cond->op2].op) in ir_try_split_if_cmp()
1927 ir_ref phi_ref = cond->op1; in ir_try_split_if_cmp()
1958 if (ir_cmp_is_true(cond->op, &ctx->ir_base[phi->op2], &ctx->ir_base[cond->op2])) { in ir_try_split_if_cmp()
1966 …if (ir_cmp_is_true(cond->op, &ctx->ir_base[phi->op3], &ctx->ir_base[cond->op2]) ^ (op == IR_IF_TRU… in ir_try_split_if_cmp()
1993 MAKE_NOP(cond); CLEAR_USES(cond_ref); in ir_try_split_if_cmp()
2033 MAKE_NOP(cond); CLEAR_USES(cond_ref); in ir_try_split_if_cmp()
2087 cond->op1 = phi->op3; in ir_try_split_if_cmp()