Lines Matching refs:op2
1083 IR_FOLD_COPY(op1_insn->val.u64 <= op2_insn->val.u64 ? op1 : op2); in IR_FOLD()
1092 IR_FOLD_COPY(op1_insn->val.i64 <= op2_insn->val.i64 ? op1 : op2); in IR_FOLD()
1097 IR_FOLD_COPY(op1_insn->val.d <= op2_insn->val.d ? op1 : op2); in IR_FOLD()
1102 IR_FOLD_COPY(op1_insn->val.f <= op2_insn->val.f ? op1 : op2); in IR_FOLD()
1112 IR_FOLD_COPY(op1_insn->val.u64 >= op2_insn->val.u64 ? op1 : op2); in IR_FOLD()
1121 IR_FOLD_COPY(op1_insn->val.i64 >= op2_insn->val.i64 ? op1 : op2); in IR_FOLD()
1126 IR_FOLD_COPY(op1_insn->val.d >= op2_insn->val.d ? op1 : op2); in IR_FOLD()
1131 IR_FOLD_COPY(op1_insn->val.f >= op2_insn->val.f ? op1 : op2); in IR_FOLD()
1361 if (!op2) { in IR_FOLD()
1370 if (op2 == op3 && op3 != IR_UNUSED) { in IR_FOLD()
1371 IR_FOLD_COPY(op2); in IR_FOLD()
1393 IR_FOLD_COPY(op2); in IR_FOLD()
1431 if (op2 == IR_TRUE) { in IR_FOLD()
1435 op2 = IR_UNUSED; in IR_FOLD()
1442 if (op2 != IR_TRUE) { in IR_FOLD()
1446 op2 = IR_UNUSED; in IR_FOLD()
1469 op2 = IR_UNUSED; in IR_FOLD()
1510 op2 = op1_insn->op2; in IR_FOLD()
1568 op1 = op2; in IR_FOLD()
1569 op2 = IR_UNUSED; in IR_FOLD()
1645 op1 = op2; in IR_FOLD()
1646 op2 = op1_insn->op1; in IR_FOLD()
1655 op2 = op2_insn->op1; in IR_FOLD()
1662 if (op1_insn->op2 == op2) { in IR_FOLD()
1673 if (op2_insn->op2 == op1) { in IR_FOLD()
1684 if (op1_insn->op1 == op2) { in IR_FOLD()
1686 IR_FOLD_COPY(op1_insn->op2); in IR_FOLD()
1687 } else if (op1_insn->op2 == op2) { in IR_FOLD()
1701 op1 = op2_insn->op2; in IR_FOLD()
1702 op2 = IR_UNUSED; in IR_FOLD()
1704 } else if (op2_insn->op2 == op1) { in IR_FOLD()
1708 op2 = IR_UNUSED; in IR_FOLD()
1718 if (op1_insn->op1 == op2) { in IR_FOLD()
1721 op1 = op1_insn->op2; in IR_FOLD()
1722 op2 = IR_UNUSED; in IR_FOLD()
1734 IR_FOLD_COPY(op2_insn->op2); in IR_FOLD()
1745 op1 = op1_insn->op2; in IR_FOLD()
1746 op2 = op2_insn->op2; in IR_FOLD()
1748 } else if (op1_insn->op1 == op2_insn->op2) { in IR_FOLD()
1750 op1 = op1_insn->op2; in IR_FOLD()
1751 op2 = op2_insn->op1; in IR_FOLD()
1753 } else if (op1_insn->op2 == op2_insn->op1) { in IR_FOLD()
1756 op2 = op2_insn->op2; in IR_FOLD()
1758 } else if (op1_insn->op2 == op2_insn->op2) { in IR_FOLD()
1761 op2 = op2_insn->op1; in IR_FOLD()
1780 IR_FOLD_COPY(op2); in IR_FOLD()
1785 op2 = op1; in IR_FOLD()
1798 IR_FOLD_COPY(op2); in IR_FOLD()
1805 op2 = op1; in IR_FOLD()
1810 op2 = IR_UNUSED; in IR_FOLD()
1824 op2 = op1; in IR_FOLD()
1829 op2 = IR_UNUSED; in IR_FOLD()
1843 op2 = op1; in IR_FOLD()
1848 op2 = IR_UNUSED; in IR_FOLD()
1876 op2 = IR_UNUSED; in IR_FOLD()
1906 op2 = IR_UNUSED; in IR_FOLD()
1920 op2 = IR_UNUSED; in IR_FOLD()
1930 op2 = op2_insn->op1; in IR_FOLD()
1936 IR_FOLD_COPY(op2_insn->val.b ? op1 : op2); in IR_FOLD()
1945 IR_FOLD_COPY(op2); in IR_FOLD()
1957 IR_FOLD_COPY(op2); in IR_FOLD()
1969 IR_FOLD_COPY(op2); in IR_FOLD()
1981 IR_FOLD_COPY(op2); in IR_FOLD()
1990 IR_FOLD_COPY(op2_insn->val.b ? op2 : op1); in IR_FOLD()
1999 IR_FOLD_COPY(op2); in IR_FOLD()
2011 IR_FOLD_COPY(op2); in IR_FOLD()
2023 IR_FOLD_COPY(op2); in IR_FOLD()
2035 IR_FOLD_COPY(op2); in IR_FOLD()
2050 op2 = IR_UNUSED; in IR_FOLD()
2065 op2 = IR_UNUSED; in IR_FOLD()
2080 op2 = IR_UNUSED; in IR_FOLD()
2095 op2 = IR_UNUSED; in IR_FOLD()
2110 op2 = IR_UNUSED; in IR_FOLD()
2131 op2 = op1; in IR_FOLD()
2376 if (IR_IS_CONST_REF(op1_insn->op2) in IR_FOLD()
2377 && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op) in IR_FOLD()
2378 && !(ctx->ir_base[op1_insn->op2].val.u64 in IR_FOLD()
2389 if (IR_IS_CONST_REF(op1_insn->op2)) { in IR_FOLD()
2391 uint64_t mask = ctx->ir_base[op1_insn->op2].val.u64; in IR_FOLD()
2416 if (IR_IS_CONST_REF(op1_insn->op2)) { in IR_FOLD()
2417 if (((uint8_t)-1) >> ctx->ir_base[op1_insn->op2].val.u8 == op2_insn->val.u8) { in IR_FOLD()
2427 if (IR_IS_CONST_REF(op1_insn->op2)) { in IR_FOLD()
2428 if (((uint16_t)-1) >> ctx->ir_base[op1_insn->op2].val.u16 == op2_insn->val.u16) { in IR_FOLD()
2438 if (IR_IS_CONST_REF(op1_insn->op2)) { in IR_FOLD()
2439 if (((uint32_t)-1) >> ctx->ir_base[op1_insn->op2].val.u32 == op2_insn->val.u32) { in IR_FOLD()
2449 if (IR_IS_CONST_REF(op1_insn->op2)) { in IR_FOLD()
2450 if (((uint64_t)-1) >> ctx->ir_base[op1_insn->op2].val.u64 == op2_insn->val.u64) { in IR_FOLD()
2472 op2 = ir_const_float(ctx, (float)op2_insn->val.d); in IR_FOLD()
2485 if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { in IR_FOLD()
2487 val.u64 = ctx->ir_base[op1_insn->op2].val.u64 + op2_insn->val.u64; in IR_FOLD()
2489 op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); in IR_FOLD()
2500 if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { in IR_FOLD()
2502 val.i64 = ctx->ir_base[op1_insn->op2].val.i64 + op2_insn->val.i64; in IR_FOLD()
2504 op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); in IR_FOLD()
2516 if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { in IR_FOLD()
2518 val.u64 = op2_insn->val.u64 - ctx->ir_base[op1_insn->op2].val.u64; in IR_FOLD()
2520 op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); in IR_FOLD()
2526 op2 = op1_insn->op2; in IR_FOLD()
2538 if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { in IR_FOLD()
2540 val.i64 = op2_insn->val.i64 - ctx->ir_base[op1_insn->op2].val.i64; in IR_FOLD()
2546 op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); in IR_FOLD()
2552 op2 = op1_insn->op2; in IR_FOLD()
2565 if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { in IR_FOLD()
2567 val.u64 = ctx->ir_base[op1_insn->op2].val.u64 - op2_insn->val.u64; in IR_FOLD()
2570 op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); in IR_FOLD()
2581 if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { in IR_FOLD()
2583 val.i64 = ctx->ir_base[op1_insn->op2].val.i64 - op2_insn->val.i64; in IR_FOLD()
2590 op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); in IR_FOLD()
2602 if (IR_IS_CONST_REF(op2_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op2_insn->op2].op)) { in IR_FOLD()
2604 val.u64 = op1_insn->val.u64 - ctx->ir_base[op2_insn->op2].val.u64; in IR_FOLD()
2605 op2 = op2_insn->op1; in IR_FOLD()
2617 if (IR_IS_CONST_REF(op2_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op2_insn->op2].op)) { in IR_FOLD()
2619 val.i64 = op1_insn->val.i64 - ctx->ir_base[op2_insn->op2].val.i64; in IR_FOLD()
2620 op2 = op2_insn->op1; in IR_FOLD()
2633 if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { in IR_FOLD()
2635 val.u64 = ctx->ir_base[op1_insn->op2].val.u64 + op2_insn->val.u64; in IR_FOLD()
2641 op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); in IR_FOLD()
2646 op2 = op1_insn->op2; in IR_FOLD()
2658 if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { in IR_FOLD()
2660 val.i64 = ctx->ir_base[op1_insn->op2].val.i64 + op2_insn->val.i64; in IR_FOLD()
2666 op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); in IR_FOLD()
2671 op2 = op1_insn->op2; in IR_FOLD()
2684 if (IR_IS_CONST_REF(op2_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op2_insn->op2].op)) { in IR_FOLD()
2686 val.u64 = op1_insn->val.u64 + ctx->ir_base[op2_insn->op2].val.u64; in IR_FOLD()
2687 op2 = op2_insn->op1; in IR_FOLD()
2697 op1 = op2_insn->op2; in IR_FOLD()
2698 op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); in IR_FOLD()
2709 if (IR_IS_CONST_REF(op2_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op2_insn->op2].op)) { in IR_FOLD()
2711 val.i64 = op1_insn->val.i64 + ctx->ir_base[op2_insn->op2].val.i64; in IR_FOLD()
2712 op2 = op2_insn->op1; in IR_FOLD()
2722 op1 = op2_insn->op2; in IR_FOLD()
2723 op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); in IR_FOLD()
2735 if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { in IR_FOLD()
2737 val.u64 = ctx->ir_base[op1_insn->op2].val.u64 * op2_insn->val.u64; in IR_FOLD()
2739 op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); in IR_FOLD()
2750 if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { in IR_FOLD()
2752 val.i64 = ctx->ir_base[op1_insn->op2].val.i64 * op2_insn->val.i64; in IR_FOLD()
2754 op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); in IR_FOLD()
2770 if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { in IR_FOLD()
2772 val.u64 = ctx->ir_base[op1_insn->op2].val.u64 & op2_insn->val.u64; in IR_FOLD()
2774 op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); in IR_FOLD()
2790 if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { in IR_FOLD()
2792 val.u64 = ctx->ir_base[op1_insn->op2].val.u64 | op2_insn->val.u64; in IR_FOLD()
2794 op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); in IR_FOLD()
2810 if (IR_IS_CONST_REF(op1_insn->op2) && !IR_IS_SYM_CONST(ctx->ir_base[op1_insn->op2].op)) { in IR_FOLD()
2812 val.u64 = ctx->ir_base[op1_insn->op2].val.u64 ^ op2_insn->val.u64; in IR_FOLD()
2814 op2 = ir_const(ctx, val, IR_OPT_TYPE(opt)); in IR_FOLD()
2825 if (op1_insn->op1 == op2 || op1_insn->op2 == op2) { in IR_FOLD()
2826 IR_FOLD_COPY(op2); in IR_FOLD()
2833 if (op1_insn->op1 == op2) { in IR_FOLD()
2834 IR_FOLD_COPY(op1_insn->op2); in IR_FOLD()
2835 } else if (op1_insn->op2 == op2) { in IR_FOLD()
2848 if (IR_IS_CONST_REF(op1_insn->op2) && IR_IS_CONST_REF(op2_insn->op2)) { in IR_FOLD()
2849 if (ctx->ir_base[op1_insn->op2].val.u64 + ctx->ir_base[op2_insn->op2].val.u64 == in IR_FOLD()
2853 op2 = op1_insn->op2; in IR_FOLD()
2857 } else if (ctx->ir_base[op2_insn->op2].op == IR_SUB in IR_FOLD()
2858 && IR_IS_CONST_REF(ctx->ir_base[op2_insn->op2].op1) in IR_FOLD()
2859 && ctx->ir_base[op2_insn->op2].op2 == op1_insn->op2 in IR_FOLD()
2860 … && ctx->ir_base[ctx->ir_base[op2_insn->op2].op1].val.u64 == ir_type_size[IR_OPT_TYPE(opt)] * 8) { in IR_FOLD()
2863 op2 = op1_insn->op2; in IR_FOLD()
2866 } else if (ctx->ir_base[op1_insn->op2].op == IR_SUB in IR_FOLD()
2867 && IR_IS_CONST_REF(ctx->ir_base[op1_insn->op2].op1) in IR_FOLD()
2868 && ctx->ir_base[op1_insn->op2].op2 == op2_insn->op2 in IR_FOLD()
2869 … && ctx->ir_base[ctx->ir_base[op1_insn->op2].op1].val.u64 == ir_type_size[IR_OPT_TYPE(opt)] * 8) { in IR_FOLD()
2872 op2 = op2_insn->op2; in IR_FOLD()
2886 if (op1 < op2) { /* move lower ref to op2 */ in IR_FOLD()
2887 SWAP_REFS(op1, op2); in IR_FOLD()
2896 if (op1 < op2) { /* move lower ref to op2 */ in IR_FOLD()
2897 SWAP_REFS(op1, op2); in IR_FOLD()
2906 if (IR_IS_TYPE_INT(IR_OPT_TYPE(opt)) && op1 == op2) { in IR_FOLD()
2914 if (op1 == op2) { in IR_FOLD()
2928 if (op1 == op2) { in IR_FOLD()
2937 if (op1 == op2) { in IR_FOLD()
2946 if (op1 != op2) { in IR_FOLD()
2960 if (op1 == op2) { in IR_FOLD()
2965 } else if (op1 < op2) { /* move lower ref to op2 */ in IR_FOLD()
2966 SWAP_REFS(op1, op2); in IR_FOLD()
2978 if (op1 == op2) { in IR_FOLD()
2981 } else if (op1 < op2) { /* move lower ref to op2 */ in IR_FOLD()
2982 SWAP_REFS(op1, op2); in IR_FOLD()
2990 if (op2 == op3) { in IR_FOLD()
2991 IR_FOLD_COPY(op2); in IR_FOLD()