diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2024-07-30 02:55:49 +0200 |
|---|---|---|
| committer | Alex Rønne Petersen <alex@alexrp.com> | 2024-08-01 20:58:08 +0200 |
| commit | 7d88bd0b9c4ca12235769a04c45842dab3b54827 (patch) | |
| tree | 7c04752f5de9ff83e44d2083ecfbf241760bbef0 /lib/std/simd.zig | |
| parent | a9c78185120fd1dd731c00f1bd961f0b2e2b2c83 (diff) | |
| download | zig-7d88bd0b9c4ca12235769a04c45842dab3b54827.tar.gz zig-7d88bd0b9c4ca12235769a04c45842dab3b54827.zip | |
std.simd: Fix an isARM() check to use isArmOrThumb() instead.
Thumb can have NEON instructions too.
Diffstat (limited to 'lib/std/simd.zig')
| -rw-r--r-- | lib/std/simd.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/simd.zig b/lib/std/simd.zig index a0f84b1a1d..236b9fbab8 100644 --- a/lib/std/simd.zig +++ b/lib/std/simd.zig @@ -18,7 +18,7 @@ pub fn suggestVectorLengthForCpu(comptime T: type, comptime cpu: std.Target.Cpu) if (std.Target.x86.featureSetHasAny(cpu.features, .{ .prefer_256_bit, .avx2 }) and !std.Target.x86.featureSetHas(cpu.features, .prefer_128_bit)) break :blk 256; if (std.Target.x86.featureSetHas(cpu.features, .sse)) break :blk 128; if (std.Target.x86.featureSetHasAny(cpu.features, .{ .mmx, .@"3dnow" })) break :blk 64; - } else if (cpu.arch.isARM()) { + } else if (cpu.arch.isArmOrThumb()) { if (std.Target.arm.featureSetHas(cpu.features, .neon)) break :blk 128; } else if (cpu.arch.isAARCH64()) { // SVE allows up to 2048 bits in the specification, as of 2022 the most powerful machine has implemented 512-bit |
