From 7f489035614dd1c6408a7095143d33ab90fb6be3 Mon Sep 17 00:00:00 2001 From: Jacob Young Date: Mon, 17 Aug 2026 17:41:24 -0400 Subject: [PATCH] llvm: fix instrinsics allowed special case not checking abi Closes #36505 --- src/codegen/llvm/FuncGen.zig | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/codegen/llvm/FuncGen.zig b/src/codegen/llvm/FuncGen.zig index 8cc966db96eac388e480c231c409b24af5b657db..3efb14d1b3118828adc2b316c8e1f920d51336e2 100644 --- a/src/codegen/llvm/FuncGen.zig +++ b/src/codegen/llvm/FuncGen.zig @@ -7995,14 +7995,14 @@ fn appendConstraints( fn intrinsicsAllowed(kind: enum { compiler_rt, libc }, scalar_ty: Type, target: *const std.Target) bool { if (!scalar_ty.isRuntimeFloat()) return true; const bits = scalar_ty.floatBits(target); - // Since upstream musl/msvc do not actually define the *f128 functions, llvm decides - // that it is a much better idea to just emit a call to the entirely wrong function as - // a fallback. We wouldn't want any linker errors when trying to perform an operation - // that isn't actually implemented anywhere, now would we! - if (bits == 128 and target.cpu.arch.isX86() and !target.abi.isGnu()) return switch (kind) { - .compiler_rt => true, - .libc => false, - }; + switch (kind) { + .compiler_rt => {}, + // Since upstream musl/msvc do not actually define the *f128 functions, llvm decides + // that it is a much better idea to just emit a call to the entirely wrong function as + // a fallback. We wouldn't want any linker errors when trying to perform an operation + // that isn't actually implemented anywhere, now would we! + .libc => if (bits == 128 and target.cpu.arch.isX86() and !target.abi.isGnu()) return false, + } return switch (std.zig.target.compilerRtFloatAbi(target, bits)) { .hard => true, .soft => false, -- 2.54.0