| author | |
| committer | |
| log | d840583458f03f5dcf75982e187e36796db8a9c8 |
| tree | f64d8886b5b26bed461bc97df94121824b983863 |
| parent | dea6914aaa615c91c0e23ce3c4d4dfb2095de2b0 |
14 files changed, 29 insertions(+), 85 deletions(-)
src/Air.zig-10| ... | ... | @@ -538,12 +538,6 @@ pub const Inst = struct { |
| 538 | 538 | /// Result type is always bool. |
| 539 | 539 | /// Uses the `un_op` field. |
| 540 | 540 | is_non_err_ptr, |
| 541 | /// Result type is always bool. | |
| 542 | /// Uses the `bin_op` field. | |
| 543 | bool_and, | |
| 544 | /// Result type is always bool. | |
| 545 | /// Uses the `bin_op` field. | |
| 546 | bool_or, | |
| 547 | 541 | /// Read a value from a pointer. |
| 548 | 542 | /// Uses the `ty_op` field. |
| 549 | 543 | load, |
| ... | ... | @@ -1580,8 +1574,6 @@ pub fn typeOfIndex(air: *const Air, inst: Air.Inst.Index, ip: *const InternPool) |
| 1580 | 1574 | .shl_sat, |
| 1581 | 1575 | .min, |
| 1582 | 1576 | .max, |
| 1583 | .bool_and, | |
| 1584 | .bool_or, | |
| 1585 | 1577 | .add_optimized, |
| 1586 | 1578 | .sub_optimized, |
| 1587 | 1579 | .mul_optimized, |
| ... | ... | @@ -2010,8 +2002,6 @@ pub fn mustLower(air: Air, inst: Air.Inst.Index, ip: *const InternPool) bool { |
| 2010 | 2002 | .is_non_null, |
| 2011 | 2003 | .is_err, |
| 2012 | 2004 | .is_non_err, |
| 2013 | .bool_and, | |
| 2014 | .bool_or, | |
| 2015 | 2005 | .fptrunc, |
| 2016 | 2006 | .fpext, |
| 2017 | 2007 | .intcast, |
src/Air/Legalize.zig+2-4| ... | ... | @@ -713,8 +713,6 @@ fn legalizeBody(l: *Legalize, body_start: usize, body_len: usize) Error!void { |
| 713 | 713 | .is_non_err, |
| 714 | 714 | .is_err_ptr, |
| 715 | 715 | .is_non_err_ptr, |
| 716 | .bool_and, | |
| 717 | .bool_or, | |
| 718 | 716 | => {}, |
| 719 | 717 | .load => if (l.features.has(.expand_packed_load)) { |
| 720 | 718 | const ty_op = l.air_instructions.items(.data)[@intFromEnum(inst)].ty_op; |
| ... | ... | @@ -2018,7 +2016,7 @@ fn safeIntcastBlockPayload(l: *Legalize, orig_inst: Air.Inst.Index) Error!Air.In |
| 2018 | 2016 | } else undefined; |
| 2019 | 2017 | const out_of_range_inst: Air.Inst.Index = inst: { |
| 2020 | 2018 | if (have_min_check and have_max_check) break :inst cur_block.add(l, .{ |
| 2021 | .tag = .bool_or, | |
| 2019 | .tag = .bit_or, | |
| 2022 | 2020 | .data = .{ .bin_op = .{ |
| 2023 | 2021 | .lhs = below_min_inst.toRef(), |
| 2024 | 2022 | .rhs = above_max_inst.toRef(), |
| ... | ... | @@ -2156,7 +2154,7 @@ fn safeIntFromFloatBlockPayload(l: *Legalize, orig_inst: Air.Inst.Index, optimiz |
| 2156 | 2154 | |
| 2157 | 2155 | // Combine the conditions. |
| 2158 | 2156 | const out_of_bounds_inst: Air.Inst.Index = main_block.add(l, .{ |
| 2159 | .tag = .bool_or, | |
| 2157 | .tag = .bit_or, | |
| 2160 | 2158 | .data = .{ .bin_op = .{ |
| 2161 | 2159 | .lhs = below_min_inst.toRef(), |
| 2162 | 2160 | .rhs = above_max_inst.toRef(), |
src/Air/Liveness.zig-2| ... | ... | @@ -436,8 +436,6 @@ fn analyzeInst( |
| 436 | 436 | .cmp_gt_optimized, |
| 437 | 437 | .cmp_neq, |
| 438 | 438 | .cmp_neq_optimized, |
| 439 | .bool_and, | |
| 440 | .bool_or, | |
| 441 | 439 | .store, |
| 442 | 440 | .store_safe, |
| 443 | 441 | .array_elem_val, |
src/Air/Liveness/Verify.zig-2| ... | ... | @@ -249,8 +249,6 @@ fn verifyBody(self: *Verify, body: []const Air.Inst.Index) Error!void { |
| 249 | 249 | .cmp_gt_optimized, |
| 250 | 250 | .cmp_neq, |
| 251 | 251 | .cmp_neq_optimized, |
| 252 | .bool_and, | |
| 253 | .bool_or, | |
| 254 | 252 | .store, |
| 255 | 253 | .store_safe, |
| 256 | 254 | .array_elem_val, |
src/Air/print.zig-2| ... | ... | @@ -148,8 +148,6 @@ const Writer = struct { |
| 148 | 148 | .cmp_gte, |
| 149 | 149 | .cmp_gt, |
| 150 | 150 | .cmp_neq, |
| 151 | .bool_and, | |
| 152 | .bool_or, | |
| 153 | 151 | .store, |
| 154 | 152 | .store_safe, |
| 155 | 153 | .array_elem_val, |
src/Sema.zig+9-9| ... | ... | @@ -4109,7 +4109,7 @@ fn zirForLen(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air. |
| 4109 | 4109 | if (i == len_idx) continue; |
| 4110 | 4110 | const eq = try block.addBinOp(.cmp_eq, len, arg_len); |
| 4111 | 4111 | ok = if (ok != .none) |
| 4112 | try block.addBinOp(.bool_and, ok, eq) | |
| 4112 | try block.addBinOp(.bit_and, ok, eq) | |
| 4113 | 4113 | else |
| 4114 | 4114 | eq; |
| 4115 | 4115 | } |
| ... | ... | @@ -7699,7 +7699,7 @@ fn zirErrorFromInt(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstD |
| 7699 | 7699 | const is_lte_len = try block.addUnOp(.cmp_lte_errors_len, operand); |
| 7700 | 7700 | const zero_val = Air.internedToRef((try pt.intValue(err_int_ty, 0)).toIntern()); |
| 7701 | 7701 | const is_non_zero = try block.addBinOp(.cmp_neq, operand, zero_val); |
| 7702 | const ok = try block.addBinOp(.bool_and, is_lte_len, is_non_zero); | |
| 7702 | const ok = try block.addBinOp(.bit_and, is_lte_len, is_non_zero); | |
| 7703 | 7703 | try sema.addSafetyCheck(block, src, ok, .invalid_error_code); |
| 7704 | 7704 | } |
| 7705 | 7705 | return block.addInst(.{ |
| ... | ... | @@ -14561,7 +14561,7 @@ fn addDivIntOverflowSafety( |
| 14561 | 14561 | break :ok try block.addCmpVector(casted_rhs, neg_one_ref, .neq); |
| 14562 | 14562 | }; |
| 14563 | 14563 | |
| 14564 | const ok = try block.addReduce(try block.addBinOp(.bool_or, lhs_ok, rhs_ok), .And); | |
| 14564 | const ok = try block.addReduce(try block.addBinOp(.bit_or, lhs_ok, rhs_ok), .And); | |
| 14565 | 14565 | try sema.addSafetyCheck(block, src, ok, .integer_overflow); |
| 14566 | 14566 | } else { |
| 14567 | 14567 | const lhs_ok: Air.Inst.Ref = if (maybe_lhs_val == null) ok: { |
| ... | ... | @@ -14574,7 +14574,7 @@ fn addDivIntOverflowSafety( |
| 14574 | 14574 | } else .none; // means false |
| 14575 | 14575 | |
| 14576 | 14576 | const ok = if (lhs_ok != .none and rhs_ok != .none) |
| 14577 | try block.addBinOp(.bool_or, lhs_ok, rhs_ok) | |
| 14577 | try block.addBinOp(.bit_or, lhs_ok, rhs_ok) | |
| 14578 | 14578 | else if (lhs_ok != .none) |
| 14579 | 14579 | lhs_ok |
| 14580 | 14580 | else if (rhs_ok != .none) |
| ... | ... | @@ -21236,7 +21236,7 @@ fn zirErrorCast(sema: *Sema, block: *Block, extended: Zir.Inst.Extended.InstData |
| 21236 | 21236 | } else { |
| 21237 | 21237 | // Error must be in destination set or zero. |
| 21238 | 21238 | const has_value = try block.addTyOp(.error_set_has_value, dest_err_ty, err_int_inst); |
| 21239 | const ok = try block.addBinOp(.bool_or, has_value, is_zero); | |
| 21239 | const ok = try block.addBinOp(.bit_or, has_value, is_zero); | |
| 21240 | 21240 | try sema.addSafetyCheck(block, src, ok, .invalid_error_code); |
| 21241 | 21241 | } |
| 21242 | 21242 | } else { |
| ... | ... | @@ -21794,7 +21794,7 @@ fn ptrCastFull( |
| 21794 | 21794 | assert(operand_ptr_int != .none); |
| 21795 | 21795 | const ptr_is_non_zero = try block.addBinOp(.cmp_neq, operand_ptr_int, .zero_usize); |
| 21796 | 21796 | const ok = if (src_info.flags.size == .slice and dest_info.flags.size == .slice) ok: { |
| 21797 | break :ok try block.addBinOp(.bool_or, operand_len_is_zero, ptr_is_non_zero); | |
| 21797 | break :ok try block.addBinOp(.bit_or, operand_len_is_zero, ptr_is_non_zero); | |
| 21798 | 21798 | } else ptr_is_non_zero; |
| 21799 | 21799 | try sema.addSafetyCheck(block, src, ok, .cast_to_null); |
| 21800 | 21800 | } |
| ... | ... | @@ -21807,7 +21807,7 @@ fn ptrCastFull( |
| 21807 | 21807 | const ptr_masked = try block.addBinOp(.bit_and, operand_ptr_int, align_mask); |
| 21808 | 21808 | const is_aligned = try block.addBinOp(.cmp_eq, ptr_masked, .zero_usize); |
| 21809 | 21809 | const ok = if (src_info.flags.size == .slice and dest_info.flags.size == .slice) ok: { |
| 21810 | break :ok try block.addBinOp(.bool_or, operand_len_is_zero, is_aligned); | |
| 21810 | break :ok try block.addBinOp(.bit_or, operand_len_is_zero, is_aligned); | |
| 21811 | 21811 | } else is_aligned; |
| 21812 | 21812 | try sema.addSafetyCheck(block, src, ok, .incorrect_alignment); |
| 21813 | 21813 | } |
| ... | ... | @@ -24317,7 +24317,7 @@ fn zirMemcpy( |
| 24317 | 24317 | const dest_plus_len = try sema.analyzePtrArithmetic(block, src, raw_dest_ptr, len, .ptr_add, src); |
| 24318 | 24318 | const ok1 = try block.addBinOp(.cmp_gte, raw_dest_ptr, src_plus_len); |
| 24319 | 24319 | const ok2 = try block.addBinOp(.cmp_gte, new_src_ptr, dest_plus_len); |
| 24320 | const ok = try block.addBinOp(.bool_or, ok1, ok2); | |
| 24320 | const ok = try block.addBinOp(.bit_or, ok1, ok2); | |
| 24321 | 24321 | try sema.addSafetyCheck(block, src, ok, .memcpy_alias); |
| 24322 | 24322 | } |
| 24323 | 24323 | |
| ... | ... | @@ -29524,7 +29524,7 @@ fn coerceCompatiblePtrs( |
| 29524 | 29524 | const ok = if (inst_ty.isSlice(zcu)) ok: { |
| 29525 | 29525 | const len = try sema.analyzeSliceLen(block, inst_src, inst); |
| 29526 | 29526 | const len_zero = try block.addBinOp(.cmp_eq, len, .zero_usize); |
| 29527 | break :ok try block.addBinOp(.bool_or, len_zero, is_non_zero); | |
| 29527 | break :ok try block.addBinOp(.bit_or, len_zero, is_non_zero); | |
| 29528 | 29528 | } else is_non_zero; |
| 29529 | 29529 | try sema.addSafetyCheck(block, inst_src, ok, .cast_to_null); |
| 29530 | 29530 | } |
src/codegen/aarch64/Select.zig+3-5| ... | ... | @@ -203,8 +203,6 @@ pub fn analyze(isel: *Select, air_body: []const Air.Inst.Index) !void { |
| 203 | 203 | .cmp_gt_optimized, |
| 204 | 204 | .cmp_neq, |
| 205 | 205 | .cmp_neq_optimized, |
| 206 | .bool_and, | |
| 207 | .bool_or, | |
| 208 | 206 | .array_elem_val, |
| 209 | 207 | .slice_elem_val, |
| 210 | 208 | .ptr_elem_val, |
| ... | ... | @@ -2883,7 +2881,7 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory, |
| 2883 | 2881 | |
| 2884 | 2882 | if (air.next()) |next_air_tag| continue :air_tag next_air_tag; |
| 2885 | 2883 | }, |
| 2886 | .bit_and, .bit_or, .xor, .bool_and, .bool_or => |air_tag| { | |
| 2884 | .bit_and, .bit_or, .xor => |air_tag| { | |
| 2887 | 2885 | if (isel.live_values.fetchRemove(air.inst_index)) |res_vi| { |
| 2888 | 2886 | defer res_vi.value.deref(isel); |
| 2889 | 2887 | |
| ... | ... | @@ -2914,12 +2912,12 @@ pub fn body(isel: *Select, air_body: []const Air.Inst.Index) error{ OutOfMemory, |
| 2914 | 2912 | const rhs_part_mat = try rhs_part_vi.?.matReg(isel); |
| 2915 | 2913 | try isel.emit(switch (air_tag) { |
| 2916 | 2914 | else => unreachable, |
| 2917 | .bit_and, .bool_and => switch (size) { | |
| 2915 | .bit_and => switch (size) { | |
| 2918 | 2916 | else => unreachable, |
| 2919 | 2917 | 1, 2, 4 => .@"and"(res_part_ra.w(), lhs_part_mat.ra.w(), .{ .register = rhs_part_mat.ra.w() }), |
| 2920 | 2918 | 8 => .@"and"(res_part_ra.x(), lhs_part_mat.ra.x(), .{ .register = rhs_part_mat.ra.x() }), |
| 2921 | 2919 | }, |
| 2922 | .bit_or, .bool_or => switch (size) { | |
| 2920 | .bit_or => switch (size) { | |
| 2923 | 2921 | else => unreachable, |
| 2924 | 2922 | 1, 2, 4 => .orr(res_part_ra.w(), lhs_part_mat.ra.w(), .{ .register = rhs_part_mat.ra.w() }), |
| 2925 | 2923 | 8 => .orr(res_part_ra.x(), lhs_part_mat.ra.x(), .{ .register = rhs_part_mat.ra.x() }), |
src/codegen/c.zig+2-3| ... | ... | @@ -2728,9 +2728,8 @@ fn genBodyInner(f: *Function, body: []const Air.Inst.Index) Error!void { |
| 2728 | 2728 | }, |
| 2729 | 2729 | .cmp_lte_errors_len => try airCmpLteErrorsLen(f, inst), |
| 2730 | 2730 | |
| 2731 | // bool_and and bool_or are non-short-circuit operations | |
| 2732 | .bool_and, .bit_and => try airBinOp(f, inst, "&", "and", .none), | |
| 2733 | .bool_or, .bit_or => try airBinOp(f, inst, "|", "or", .none), | |
| 2731 | .bit_and => try airBinOp(f, inst, "&", "and", .none), | |
| 2732 | .bit_or => try airBinOp(f, inst, "|", "or", .none), | |
| 2734 | 2733 | .xor => try airBinOp(f, inst, "^", "xor", .none), |
| 2735 | 2734 | .shr, .shr_exact => try airBinBuiltinCall(f, inst, "shr", .none), |
| 2736 | 2735 | .shl, => try airBinBuiltinCall(f, inst, "shlw", .bits), |
src/codegen/llvm/FuncGen.zig+5-5| ... | ... | @@ -258,11 +258,11 @@ pub fn genBody(self: *FuncGen, body: []const Air.Inst.Index, coverage_point: Air |
| 258 | 258 | .mul_with_overflow => try self.airOverflow(inst, .@"smul.with.overflow", .@"umul.with.overflow"), |
| 259 | 259 | .shl_with_overflow => try self.airShlWithOverflow(inst), |
| 260 | 260 | |
| 261 | .bit_and, .bool_and => try self.airAnd(inst), | |
| 262 | .bit_or, .bool_or => try self.airOr(inst), | |
| 263 | .xor => try self.airXor(inst), | |
| 264 | .shr => try self.airShr(inst, false), | |
| 265 | .shr_exact => try self.airShr(inst, true), | |
| 261 | .bit_and => try self.airAnd(inst), | |
| 262 | .bit_or => try self.airOr(inst), | |
| 263 | .xor => try self.airXor(inst), | |
| 264 | .shr => try self.airShr(inst, false), | |
| 265 | .shr_exact => try self.airShr(inst, true), | |
| 266 | 266 | |
| 267 | 267 | .sqrt => try self.airUnaryOp(inst, .sqrt), |
| 268 | 268 | .sin => try self.airUnaryOp(inst, .sin), |
src/codegen/riscv64/CodeGen.zig+2-13| ... | ... | @@ -1415,8 +1415,6 @@ fn genBody(func: *Func, body: []const Air.Inst.Index) InnerError!void { |
| 1415 | 1415 | .shl, .shl_exact, |
| 1416 | 1416 | .shr, .shr_exact, |
| 1417 | 1417 | |
| 1418 | .bool_and, | |
| 1419 | .bool_or, | |
| 1420 | 1418 | .bit_and, |
| 1421 | 1419 | .bit_or, |
| 1422 | 1420 | |
| ... | ... | @@ -2702,13 +2700,11 @@ fn genBinOp( |
| 2702 | 2700 | |
| 2703 | 2701 | .bit_and, |
| 2704 | 2702 | .bit_or, |
| 2705 | .bool_and, | |
| 2706 | .bool_or, | |
| 2707 | 2703 | => { |
| 2708 | 2704 | _ = try func.addInst(.{ |
| 2709 | 2705 | .tag = switch (tag) { |
| 2710 | .bit_and, .bool_and => .@"and", | |
| 2711 | .bit_or, .bool_or => .@"or", | |
| 2706 | .bit_and => .@"and", | |
| 2707 | .bit_or => .@"or", | |
| 2712 | 2708 | else => unreachable, |
| 2713 | 2709 | }, |
| 2714 | 2710 | .data = .{ |
| ... | ... | @@ -2719,13 +2715,6 @@ fn genBinOp( |
| 2719 | 2715 | }, |
| 2720 | 2716 | }, |
| 2721 | 2717 | }); |
| 2722 | ||
| 2723 | switch (tag) { | |
| 2724 | .bool_and, | |
| 2725 | .bool_or, | |
| 2726 | => try func.truncateRegister(Type.bool, dst_reg), | |
| 2727 | else => {}, | |
| 2728 | } | |
| 2729 | 2718 | }, |
| 2730 | 2719 | |
| 2731 | 2720 | .shr, |
src/codegen/sparc64/CodeGen.zig-22| ... | ... | @@ -499,8 +499,6 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void { |
| 499 | 499 | .shl_exact => try self.airBinOp(inst, .shl_exact), |
| 500 | 500 | .shr => try self.airBinOp(inst, .shr), |
| 501 | 501 | .shr_exact => try self.airBinOp(inst, .shr_exact), |
| 502 | .bool_and => try self.airBinOp(inst, .bool_and), | |
| 503 | .bool_or => try self.airBinOp(inst, .bool_or), | |
| 504 | 502 | .bit_and => try self.airBinOp(inst, .bit_and), |
| 505 | 503 | .bit_or => try self.airBinOp(inst, .bit_or), |
| 506 | 504 | .xor => try self.airBinOp(inst, .xor), |
| ... | ... | @@ -2941,26 +2939,6 @@ fn binOp( |
| 2941 | 2939 | } |
| 2942 | 2940 | }, |
| 2943 | 2941 | |
| 2944 | .bool_and, | |
| 2945 | .bool_or, | |
| 2946 | => { | |
| 2947 | switch (lhs_ty.zigTypeTag(zcu)) { | |
| 2948 | .bool => { | |
| 2949 | assert(lhs != .immediate); // should have been handled by Sema | |
| 2950 | assert(rhs != .immediate); // should have been handled by Sema | |
| 2951 | ||
| 2952 | const mir_tag: Mir.Inst.Tag = switch (tag) { | |
| 2953 | .bool_and => .@"and", | |
| 2954 | .bool_or => .@"or", | |
| 2955 | else => unreachable, | |
| 2956 | }; | |
| 2957 | ||
| 2958 | return try self.binOpRegister(mir_tag, lhs, rhs, lhs_ty, rhs_ty, metadata); | |
| 2959 | }, | |
| 2960 | else => unreachable, | |
| 2961 | } | |
| 2962 | }, | |
| 2963 | ||
| 2964 | 2942 | .shl, |
| 2965 | 2943 | .shr, |
| 2966 | 2944 | => { |
src/codegen/spirv/CodeGen.zig-2| ... | ... | @@ -2693,8 +2693,6 @@ fn genInst(cg: *CodeGen, inst: Air.Inst.Index) Error!void { |
| 2693 | 2693 | .bit_and => try cg.airBinOpSimple(inst, .OpBitwiseAnd), |
| 2694 | 2694 | .bit_or => try cg.airBinOpSimple(inst, .OpBitwiseOr), |
| 2695 | 2695 | .xor => try cg.airBinOpSimple(inst, .OpBitwiseXor), |
| 2696 | .bool_and => try cg.airBinOpSimple(inst, .OpLogicalAnd), | |
| 2697 | .bool_or => try cg.airBinOpSimple(inst, .OpLogicalOr), | |
| 2698 | 2696 | |
| 2699 | 2697 | .shl, .shl_exact => try cg.airShift(inst, .OpShiftLeftLogical, .OpShiftLeftLogical), |
| 2700 | 2698 | .shr, .shr_exact => try cg.airShift(inst, .OpShiftRightLogical, .OpShiftRightArithmetic), |
src/codegen/wasm/CodeGen.zig+3-3| ... | ... | @@ -1516,7 +1516,7 @@ fn genInst(cg: *CodeGen, inst: Air.Inst.Index) InnerError!void { |
| 1516 | 1516 | try cg.finishAir(inst, result, &.{ bin_op.lhs, bin_op.rhs }); |
| 1517 | 1517 | }, |
| 1518 | 1518 | |
| 1519 | .bit_and, .bit_or, .bool_and, .bool_or, .xor, .shl_exact, .shr, .shr_exact => |tag| { | |
| 1519 | .bit_and, .bit_or, .xor, .shl_exact, .shr, .shr_exact => |tag| { | |
| 1520 | 1520 | const bin_op = cg.air.instructions.items(.data)[@intFromEnum(inst)].bin_op; |
| 1521 | 1521 | const lhs = try cg.resolveInst(bin_op.lhs); |
| 1522 | 1522 | const rhs = try cg.resolveInst(bin_op.rhs); |
| ... | ... | @@ -1528,8 +1528,8 @@ fn genInst(cg: *CodeGen, inst: Air.Inst.Index) InnerError!void { |
| 1528 | 1528 | |
| 1529 | 1529 | const int_ty: IntType = .fromType(cg, ty); |
| 1530 | 1530 | const result = switch (tag) { |
| 1531 | .bit_and, .bool_and => try cg.intAnd(int_ty, lhs, rhs), | |
| 1532 | .bit_or, .bool_or => try cg.intOr(int_ty, lhs, rhs), | |
| 1531 | .bit_and => try cg.intAnd(int_ty, lhs, rhs), | |
| 1532 | .bit_or => try cg.intOr(int_ty, lhs, rhs), | |
| 1533 | 1533 | .xor => try cg.intXor(int_ty, lhs, rhs), |
| 1534 | 1534 | .shl_exact => try cg.intShl(int_ty, lhs, rhs), |
| 1535 | 1535 | .shr, .shr_exact => try cg.intShr(int_ty, lhs, rhs), |
src/codegen/x86_64/CodeGen.zig+3-3| ... | ... | @@ -60839,14 +60839,14 @@ fn genBody(cg: *CodeGen, body: []const Air.Inst.Index) InnerError!void { |
| 60839 | 60839 | try slot.finish(inst, &.{}, &.{}, cg); |
| 60840 | 60840 | }, |
| 60841 | 60841 | .assembly => try cg.airAsm(inst), |
| 60842 | .bit_and, .bit_or, .xor, .bool_and, .bool_or => |air_tag| { | |
| 60842 | .bit_and, .bit_or, .xor => |air_tag| { | |
| 60843 | 60843 | const bin_op = air_datas[@intFromEnum(inst)].bin_op; |
| 60844 | 60844 | var ops = try cg.tempsFromOperands(inst, .{ bin_op.lhs, bin_op.rhs }); |
| 60845 | 60845 | var res: [1]Temp = undefined; |
| 60846 | 60846 | cg.select(&res, &.{cg.typeOf(bin_op.lhs)}, &ops, switch (@as(Mir.Inst.Tag, switch (air_tag) { |
| 60847 | 60847 | else => unreachable, |
| 60848 | .bit_and, .bool_and => .@"and", | |
| 60849 | .bit_or, .bool_or => .@"or", | |
| 60848 | .bit_and => .@"and", | |
| 60849 | .bit_or => .@"or", | |
| 60850 | 60850 | .xor => .xor, |
| 60851 | 60851 | })) { |
| 60852 | 60852 | else => unreachable, |