| ... | @@ -4872,10 +4872,8 @@ pub const FuncGen = struct { | ... | @@ -4872,10 +4872,8 @@ pub const FuncGen = struct { |
| 4872 | const ptr = if (poi_index == 0) base_ptr else try self.wip.gep(.inbounds, .i8, base_ptr, &.{ | 4872 | const ptr = if (poi_index == 0) base_ptr else try self.wip.gep(.inbounds, .i8, base_ptr, &.{ |
| 4873 | try o.builder.intValue(.i32, poi_index), | 4873 | try o.builder.intValue(.i32, poi_index), |
| 4874 | }, ""); | 4874 | }, ""); |
| 4875 | const counter = try self.wip.load(.normal, .i8, ptr, .default, ""); | | |
| 4876 | const one = try o.builder.intValue(.i8, 1); | 4875 | const one = try o.builder.intValue(.i8, 1); |
| 4877 | const counter_incremented = try self.wip.bin(.add, counter, one, ""); | 4876 | _ = try self.wip.atomicrmw(.normal, .add, ptr, one, self.sync_scope, .monotonic, .default, ""); |
| 4878 | _ = try self.wip.store(.normal, counter_incremented, ptr, .default); | | |
| 4879 | | 4877 | |
| 4880 | // LLVM does not allow blockaddress on the entry block. | 4878 | // LLVM does not allow blockaddress on the entry block. |
| 4881 | const pc = if (self.wip.cursor.block == .entry) | 4879 | const pc = if (self.wip.cursor.block == .entry) |