authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-08-02 21:17:38+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2025-08-30 06:36:41+02:00
loge4f38a611f1ba669434d52e753ae2c729911eead
tree155adc7d3bd3443b3d2dfb2a01553f2a9cf2a8bf
parent1c858ba7e302c2e0bcff1e54c599865eae4c3578
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

llvm: switch to native f16 IR type for all hexagon targets

This was fixed in LLVM 21, in particular for targets older than v68.

2 files changed, 1 insertions(+), 3 deletions(-)

lib/compiler_rt/common.zig+1-1
...@@ -123,6 +123,7 @@ pub fn F16T(comptime OtherType: type) type {...@@ -123,6 +123,7 @@ pub fn F16T(comptime OtherType: type) type {
123 .thumbeb,123 .thumbeb,
124 .aarch64,124 .aarch64,
125 .aarch64_be,125 .aarch64_be,
126 .hexagon,
126 .loongarch32,127 .loongarch32,
127 .loongarch64,128 .loongarch64,
128 .nvptx,129 .nvptx,
...@@ -135,7 +136,6 @@ pub fn F16T(comptime OtherType: type) type {...@@ -135,7 +136,6 @@ pub fn F16T(comptime OtherType: type) type {
135 .spirv32,136 .spirv32,
136 .spirv64,137 .spirv64,
137 => f16,138 => f16,
138 .hexagon => if (builtin.target.cpu.has(.hexagon, .v68)) f16 else u16,
139 .x86, .x86_64 => if (builtin.target.os.tag.isDarwin()) switch (OtherType) {139 .x86, .x86_64 => if (builtin.target.os.tag.isDarwin()) switch (OtherType) {
140 // Starting with LLVM 16, Darwin uses different abi for f16140 // Starting with LLVM 16, Darwin uses different abi for f16
141 // depending on the type of the other return/argument..???141 // depending on the type of the other return/argument..???
src/codegen/llvm.zig-2
...@@ -12852,8 +12852,6 @@ fn backendSupportsF16(target: *const std.Target) bool {...@@ -12852,8 +12852,6 @@ fn backendSupportsF16(target: *const std.Target) bool {
12852 // https://github.com/llvm/llvm-project/issues/9798112852 // https://github.com/llvm/llvm-project/issues/97981
12853 .csky,12853 .csky,
12854 // https://github.com/llvm/llvm-project/issues/9798112854 // https://github.com/llvm/llvm-project/issues/97981
12855 .hexagon,
12856 // https://github.com/llvm/llvm-project/issues/97981
12857 .powerpc,12855 .powerpc,
12858 .powerpcle,12856 .powerpcle,
12859 .powerpc64,12857 .powerpc64,