From 143767a05bae7247733b6f03b56d603080a83df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 5 Aug 2026 13:08:30 +0200 Subject: [PATCH 1/2] std.Target: bump baseline CPU for powerpc64-(freebsd,linux) to pwr8 Linux and FreeBSD usage on PowerPC broadly splits into two camps: * Old Apple/Amiga hardware * Modern IBM POWER hardware In the first camp, we're talking hardware like the PowerPC 970 (2002) or even older in some cases. In the second camp, most hardware still in use today is POWER8 (2014) or newer. I think it's safe to say that the first camp is in the minority, especially since the open hardware platform that Raptor Computing Systems sells is based on POWER9, and I expect that to be more interesting to PowerPC enthusiasts nowadays. Also, compiler support for the old hardware is poorly maintained. IBM themselves only seem to care to support the newer POWER processors in the Linux kernel as well as GCC and LLVM. We keep running into LLVM bugs when targeting those older CPUs. --- lib/std/Target.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/std/Target.zig b/lib/std/Target.zig index 29440d64af025266aa10b860ffaeb69e9917c591..6ab6f2c81b1d8de3edee4c53bd7097a3cd3ae123 100644 --- a/lib/std/Target.zig +++ b/lib/std/Target.zig @@ -2081,6 +2081,7 @@ pub const Cpu = struct { else => generic(arch), }, .powerpc64 => switch (os.tag) { + .linux, .freebsd => &powerpc.cpu.pwr8, .openbsd => &powerpc.cpu.pwr9, else => generic(arch), }, -- 2.54.0 From 184234141d97f2b24f00626a3ed82cb44f4e4235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 5 Aug 2026 13:24:32 +0200 Subject: [PATCH 2/2] behavior: disable some failing float vector comparison tests on powerpc64 https://github.com/llvm/llvm-project/issues/214198 --- test/behavior/floatop.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/behavior/floatop.zig b/test/behavior/floatop.zig index 583b6bf6aba3f0596a452e5f311bc1a388cd4691..73a1d8c4d4ad0e1e125fc89a40ada8286d8dfb20 100644 --- a/test/behavior/floatop.zig +++ b/test/behavior/floatop.zig @@ -228,7 +228,7 @@ test "vector cmp f32" { if (builtin.zig_backend == .stage2_sparc64) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isArm()) return error.SkipZigTest; - if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest; + if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/214198 if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .hexagon) return error.SkipZigTest; try testCmpVector(f32); @@ -250,7 +250,7 @@ test "vector cmp f128" { if (builtin.zig_backend == .stage2_arm) return error.SkipZigTest; // TODO if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; - if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .powerpc64le) return error.SkipZigTest; + if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/214198 if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .hexagon) return error.SkipZigTest; try testCmpVector(f128); @@ -260,7 +260,7 @@ test "vector cmp f128" { test "vector cmp f80/c_longdouble" { if (builtin.zig_backend == .stage2_aarch64) return error.SkipZigTest; if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .hexagon) return error.SkipZigTest; - if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch == .powerpc64le) return error.SkipZigTest; + if (builtin.zig_backend == .stage2_llvm and builtin.cpu.arch.isPowerPC64()) return error.SkipZigTest; // https://github.com/llvm/llvm-project/issues/214198 if (builtin.zig_backend == .stage2_riscv64) return error.SkipZigTest; if (builtin.zig_backend == .stage2_spirv) return error.SkipZigTest; -- 2.54.0