authorgravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2026-08-17 17:41:24-04:00
committergravatar for jacobly@ziglang.orgJacob Young <jacobly@ziglang.org> 2026-08-17 18:09:25-04:00
log7f489035614dd1c6408a7095143d33ab90fb6be3
treeaff08d8450b6d5e8727106a0e4b42d7fde2ddfb4
parent6716bf52e70791104caf057af3fece674f0ac3dd

llvm: fix instrinsics allowed special case not checking abi

Closes #36505

1 files changed, 8 insertions(+), 8 deletions(-)

src/codegen/llvm/FuncGen.zig+8-8
......@@ -7995,14 +7995,14 @@ fn appendConstraints(
79957995fn intrinsicsAllowed(kind: enum { compiler_rt, libc }, scalar_ty: Type, target: *const std.Target) bool {
79967996 if (!scalar_ty.isRuntimeFloat()) return true;
79977997 const bits = scalar_ty.floatBits(target);
7998 // Since upstream musl/msvc do not actually define the *f128 functions, llvm decides
7999 // that it is a much better idea to just emit a call to the entirely wrong function as
8000 // a fallback. We wouldn't want any linker errors when trying to perform an operation
8001 // that isn't actually implemented anywhere, now would we!
8002 if (bits == 128 and target.cpu.arch.isX86() and !target.abi.isGnu()) return switch (kind) {
8003 .compiler_rt => true,
8004 .libc => false,
8005 };
7998 switch (kind) {
7999 .compiler_rt => {},
8000 // Since upstream musl/msvc do not actually define the *f128 functions, llvm decides
8001 // that it is a much better idea to just emit a call to the entirely wrong function as
8002 // a fallback. We wouldn't want any linker errors when trying to perform an operation
8003 // that isn't actually implemented anywhere, now would we!
8004 .libc => if (bits == 128 and target.cpu.arch.isX86() and !target.abi.isGnu()) return false,
8005 }
80068006 return switch (std.zig.target.compilerRtFloatAbi(target, bits)) {
80078007 .hard => true,
80088008 .soft => false,