Skip to content

Commit 4652729

Browse files
xdBronchVexu
authored andcommitted
std.simd.suggestVectorSizeForCpu: fix missing argument in body
1 parent 68bacad commit 4652729

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/std/simd.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub fn suggestVectorSizeForCpu(comptime T: type, comptime cpu: std.Target.Cpu) ?
1212
const element_bit_size = @max(8, std.math.ceilPowerOfTwo(u16, @bitSizeOf(T)) catch unreachable);
1313
const vector_bit_size: u16 = blk: {
1414
if (cpu.arch.isX86()) {
15-
if (T == bool and std.Target.x86.featureSetHas(.prefer_mask_registers)) return 64;
15+
if (T == bool and std.Target.x86.featureSetHas(cpu.features, .prefer_mask_registers)) return 64;
1616
if (std.Target.x86.featureSetHas(cpu.features, .avx512f) and !std.Target.x86.featureSetHasAny(cpu.features, .{ .prefer_256_bit, .prefer_128_bit })) break :blk 512;
1717
if (std.Target.x86.featureSetHasAny(cpu.features, .{ .prefer_256_bit, .avx2 }) and !std.Target.x86.featureSetHas(cpu.features, .prefer_128_bit)) break :blk 256;
1818
if (std.Target.x86.featureSetHas(cpu.features, .sse)) break :blk 128;

0 commit comments

Comments
 (0)