| ... | ... | @@ -14734,39 +14734,23 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co |
| 14734 | 14734 | }, adapter); |
| 14735 | 14735 | }, |
| 14736 | 14736 | .add, |
| 14737 | | .@"add nsw", |
| 14738 | | .@"add nuw", |
| 14739 | | .@"add nuw nsw", |
| 14740 | 14737 | .@"and", |
| 14741 | 14738 | .fadd, |
| 14742 | 14739 | .fdiv, |
| 14743 | 14740 | .fmul, |
| 14744 | 14741 | .mul, |
| 14745 | | .@"mul nsw", |
| 14746 | | .@"mul nuw", |
| 14747 | | .@"mul nuw nsw", |
| 14748 | 14742 | .frem, |
| 14749 | 14743 | .fsub, |
| 14750 | 14744 | .sdiv, |
| 14751 | | .@"sdiv exact", |
| 14752 | 14745 | .sub, |
| 14753 | | .@"sub nsw", |
| 14754 | | .@"sub nuw", |
| 14755 | | .@"sub nuw nsw", |
| 14756 | 14746 | .udiv, |
| 14757 | | .@"udiv exact", |
| 14758 | 14747 | .xor, |
| 14759 | 14748 | .shl, |
| 14760 | | .@"shl nsw", |
| 14761 | | .@"shl nuw", |
| 14762 | | .@"shl nuw nsw", |
| 14763 | 14749 | .lshr, |
| 14764 | | .@"lshr exact", |
| 14765 | 14750 | .@"or", |
| 14766 | 14751 | .urem, |
| 14767 | 14752 | .srem, |
| 14768 | 14753 | .ashr, |
| 14769 | | .@"ashr exact", |
| 14770 | 14754 | => |kind| { |
| 14771 | 14755 | const extra = func.extraData(Function.Instruction.Binary, datas[instr_index]); |
| 14772 | 14756 | try function_block.writeAbbrev(FunctionBlock.Binary{ |
| ... | ... | @@ -14775,6 +14759,56 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co |
| 14775 | 14759 | .rhs = adapter.getOffsetValueIndex(extra.rhs), |
| 14776 | 14760 | }); |
| 14777 | 14761 | }, |
| 14762 | .@"sdiv exact", |
| 14763 | .@"udiv exact", |
| 14764 | .@"lshr exact", |
| 14765 | .@"ashr exact", |
| 14766 | => |kind| { |
| 14767 | const extra = func.extraData(Function.Instruction.Binary, datas[instr_index]); |
| 14768 | try function_block.writeAbbrev(FunctionBlock.BinaryExact{ |
| 14769 | .opcode = kind.toBinaryOpcode(), |
| 14770 | .lhs = adapter.getOffsetValueIndex(extra.lhs), |
| 14771 | .rhs = adapter.getOffsetValueIndex(extra.rhs), |
| 14772 | }); |
| 14773 | }, |
| 14774 | .@"add nsw", |
| 14775 | .@"add nuw", |
| 14776 | .@"add nuw nsw", |
| 14777 | .@"mul nsw", |
| 14778 | .@"mul nuw", |
| 14779 | .@"mul nuw nsw", |
| 14780 | .@"sub nsw", |
| 14781 | .@"sub nuw", |
| 14782 | .@"sub nuw nsw", |
| 14783 | .@"shl nsw", |
| 14784 | .@"shl nuw", |
| 14785 | .@"shl nuw nsw", |
| 14786 | => |kind| { |
| 14787 | const extra = func.extraData(Function.Instruction.Binary, datas[instr_index]); |
| 14788 | try function_block.writeAbbrev(FunctionBlock.BinaryNoWrap{ |
| 14789 | .opcode = kind.toBinaryOpcode(), |
| 14790 | .lhs = adapter.getOffsetValueIndex(extra.lhs), |
| 14791 | .rhs = adapter.getOffsetValueIndex(extra.rhs), |
| 14792 | .flags = switch (kind) { |
| 14793 | .@"add nsw", |
| 14794 | .@"mul nsw", |
| 14795 | .@"sub nsw", |
| 14796 | .@"shl nsw", |
| 14797 | => .{ .no_unsigned_wrap = false, .no_signed_wrap = true }, |
| 14798 | .@"add nuw", |
| 14799 | .@"mul nuw", |
| 14800 | .@"sub nuw", |
| 14801 | .@"shl nuw", |
| 14802 | => .{ .no_unsigned_wrap = true, .no_signed_wrap = false }, |
| 14803 | .@"add nuw nsw", |
| 14804 | .@"mul nuw nsw", |
| 14805 | .@"sub nuw nsw", |
| 14806 | .@"shl nuw nsw", |
| 14807 | => .{ .no_unsigned_wrap = true, .no_signed_wrap = true }, |
| 14808 | else => unreachable, |
| 14809 | }, |
| 14810 | }); |
| 14811 | }, |
| 14778 | 14812 | .@"fadd fast", |
| 14779 | 14813 | .@"fdiv fast", |
| 14780 | 14814 | .@"fmul fast", |