mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 14:25:16 +00:00
Change < to <= in indexOfSentinel SIMD path
This commit is contained in:
parent
59ac0d1eed
commit
564b1da214
@ -975,7 +975,7 @@ pub fn indexOfSentinel(comptime T: type, comptime sentinel: T, p: [*:sentinel]co
|
||||
// First block may be unaligned
|
||||
const start_addr = @intFromPtr(&p[i]);
|
||||
const offset_in_page = start_addr & (std.mem.page_size - 1);
|
||||
if (offset_in_page < std.mem.page_size - @sizeOf(Block)) {
|
||||
if (offset_in_page <= std.mem.page_size - @sizeOf(Block)) {
|
||||
// Will not read past the end of a page, full block.
|
||||
const block: Block = p[i..][0..block_len].*;
|
||||
const matches = block == mask;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user