From e4f38a611f1ba669434d52e753ae2c729911eead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Sat, 2 Aug 2025 21:17:38 +0200 Subject: [PATCH] llvm: switch to native f16 IR type for all hexagon targets This was fixed in LLVM 21, in particular for targets older than v68. --- lib/compiler_rt/common.zig | 2 +- src/codegen/llvm.zig | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/compiler_rt/common.zig b/lib/compiler_rt/common.zig index 0db4b5c66c42957dc0025cf0146e4a8008799366..87747db273ea36edf069f4c232fbcb960bd0b451 100644 --- a/lib/compiler_rt/common.zig +++ b/lib/compiler_rt/common.zig @@ -123,6 +123,7 @@ pub fn F16T(comptime OtherType: type) type { .thumbeb, .aarch64, .aarch64_be, + .hexagon, .loongarch32, .loongarch64, .nvptx, @@ -135,7 +136,6 @@ pub fn F16T(comptime OtherType: type) type { .spirv32, .spirv64, => f16, - .hexagon => if (builtin.target.cpu.has(.hexagon, .v68)) f16 else u16, .x86, .x86_64 => if (builtin.target.os.tag.isDarwin()) switch (OtherType) { // Starting with LLVM 16, Darwin uses different abi for f16 // depending on the type of the other return/argument..??? diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index bed0fab45a5804af71fc4142a770eef11b760952..b9e17d06e95d3632ca911029ceb16206a3f6c9fd 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -12852,8 +12852,6 @@ fn backendSupportsF16(target: *const std.Target) bool { // https://github.com/llvm/llvm-project/issues/97981 .csky, // https://github.com/llvm/llvm-project/issues/97981 - .hexagon, - // https://github.com/llvm/llvm-project/issues/97981 .powerpc, .powerpcle, .powerpc64, -- 2.54.0