mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
std: remove workaround for fixed bug
The miscompilation in question has been fixed upstream in LLVM 13. closes #8117
This commit is contained in:
parent
0a89624d59
commit
68f2d6cb24
@ -320,11 +320,7 @@ pub fn MultiArrayList(comptime S: type) type {
|
||||
inline for (fields) |field_info, i| {
|
||||
if (@sizeOf(field_info.field_type) != 0) {
|
||||
const field = @intToEnum(Field, i);
|
||||
// TODO we should be able to use std.mem.copy here but it causes a
|
||||
// test failure on aarch64 with -OReleaseFast
|
||||
const src_slice = mem.sliceAsBytes(self_slice.items(field));
|
||||
const dst_slice = mem.sliceAsBytes(other_slice.items(field));
|
||||
@memcpy(dst_slice.ptr, src_slice.ptr, src_slice.len);
|
||||
mem.copy(field_info.field_type, other_slice.items(field), self_slice.items(field));
|
||||
}
|
||||
}
|
||||
gpa.free(self.allocatedBytes());
|
||||
@ -388,11 +384,7 @@ pub fn MultiArrayList(comptime S: type) type {
|
||||
inline for (fields) |field_info, i| {
|
||||
if (@sizeOf(field_info.field_type) != 0) {
|
||||
const field = @intToEnum(Field, i);
|
||||
// TODO we should be able to use std.mem.copy here but it causes a
|
||||
// test failure on aarch64 with -OReleaseFast
|
||||
const src_slice = mem.sliceAsBytes(self_slice.items(field));
|
||||
const dst_slice = mem.sliceAsBytes(other_slice.items(field));
|
||||
@memcpy(dst_slice.ptr, src_slice.ptr, src_slice.len);
|
||||
mem.copy(field_info.field_type, other_slice.items(field), self_slice.items(field));
|
||||
}
|
||||
}
|
||||
gpa.free(self.allocatedBytes());
|
||||
@ -411,11 +403,7 @@ pub fn MultiArrayList(comptime S: type) type {
|
||||
inline for (fields) |field_info, i| {
|
||||
if (@sizeOf(field_info.field_type) != 0) {
|
||||
const field = @intToEnum(Field, i);
|
||||
// TODO we should be able to use std.mem.copy here but it causes a
|
||||
// test failure on aarch64 with -OReleaseFast
|
||||
const src_slice = mem.sliceAsBytes(self_slice.items(field));
|
||||
const dst_slice = mem.sliceAsBytes(result_slice.items(field));
|
||||
@memcpy(dst_slice.ptr, src_slice.ptr, src_slice.len);
|
||||
mem.copy(field_info.field_type, result_slice.items(field), self_slice.items(field));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user