| author | |
| committer | |
| log | fc776783391b16ef77df05581412746bdb83ffa6 |
| tree | d4e1370a26e2f3ebf8fbabf2a1087535345d017b |
| parent | 95720f007bb0dacc8a7cecb621c322d574c61d00 |
also seems to work around aarch64 LLVM miscompilation :thinking:1 files changed, 1 insertions(+), 0 deletions(-)
lib/std/mem.zig+1| ... | ... | @@ -1119,6 +1119,7 @@ pub fn indexOfSentinel(comptime T: type, comptime sentinel: T, p: [*:sentinel]co |
| 1119 | 1119 | |
| 1120 | 1120 | i += @divExact(std.mem.alignForward(usize, start_addr, block_size) - start_addr, @sizeOf(T)); |
| 1121 | 1121 | } else { |
| 1122 | @branchHint(.unlikely); | |
| 1122 | 1123 | // Would read over a page boundary. Per-byte at a time until aligned or found. |
| 1123 | 1124 | // 0.39% chance this branch is taken for 4K pages at 16b block length. |
| 1124 | 1125 | // |