| ... | @@ -14734,39 +14734,23 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co | ... | @@ -14734,39 +14734,23 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co |
| 14734 | }, adapter); | 14734 | }, adapter); |
| 14735 | }, | 14735 | }, |
| 14736 | .add, | 14736 | .add, |
| 14737 | .@"add nsw", | | |
| 14738 | .@"add nuw", | | |
| 14739 | .@"add nuw nsw", | | |
| 14740 | .@"and", | 14737 | .@"and", |
| 14741 | .fadd, | 14738 | .fadd, |
| 14742 | .fdiv, | 14739 | .fdiv, |
| 14743 | .fmul, | 14740 | .fmul, |
| 14744 | .mul, | 14741 | .mul, |
| 14745 | .@"mul nsw", | | |
| 14746 | .@"mul nuw", | | |
| 14747 | .@"mul nuw nsw", | | |
| 14748 | .frem, | 14742 | .frem, |
| 14749 | .fsub, | 14743 | .fsub, |
| 14750 | .sdiv, | 14744 | .sdiv, |
| 14751 | .@"sdiv exact", | | |
| 14752 | .sub, | 14745 | .sub, |
| 14753 | .@"sub nsw", | | |
| 14754 | .@"sub nuw", | | |
| 14755 | .@"sub nuw nsw", | | |
| 14756 | .udiv, | 14746 | .udiv, |
| 14757 | .@"udiv exact", | | |
| 14758 | .xor, | 14747 | .xor, |
| 14759 | .shl, | 14748 | .shl, |
| 14760 | .@"shl nsw", | | |
| 14761 | .@"shl nuw", | | |
| 14762 | .@"shl nuw nsw", | | |
| 14763 | .lshr, | 14749 | .lshr, |
| 14764 | .@"lshr exact", | | |
| 14765 | .@"or", | 14750 | .@"or", |
| 14766 | .urem, | 14751 | .urem, |
| 14767 | .srem, | 14752 | .srem, |
| 14768 | .ashr, | 14753 | .ashr, |
| 14769 | .@"ashr exact", | | |
| 14770 | => |kind| { | 14754 | => |kind| { |
| 14771 | const extra = func.extraData(Function.Instruction.Binary, datas[instr_index]); | 14755 | const extra = func.extraData(Function.Instruction.Binary, datas[instr_index]); |
| 14772 | try function_block.writeAbbrev(FunctionBlock.Binary{ | 14756 | try function_block.writeAbbrev(FunctionBlock.Binary{ |
| ... | @@ -14775,6 +14759,56 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co | ... | @@ -14775,6 +14759,56 @@ pub fn toBitcode(self: *Builder, allocator: Allocator) bitcode_writer.Error![]co |
| 14775 | .rhs = adapter.getOffsetValueIndex(extra.rhs), | 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 | .@"fadd fast", | 14812 | .@"fadd fast", |
| 14779 | .@"fdiv fast", | 14813 | .@"fdiv fast", |
| 14780 | .@"fmul fast", | 14814 | .@"fmul fast", |