From 3bc4d7cb7938b8a770810666c639d28b05ab7779 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 23 Jul 2022 02:37:43 -0500 Subject: user/llvm14: Mark roundeven* unavailable on musl --- user/llvm14/roundeven.patch | 49 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 user/llvm14/roundeven.patch (limited to 'user/llvm14/roundeven.patch') diff --git a/user/llvm14/roundeven.patch b/user/llvm14/roundeven.patch new file mode 100644 index 000000000..04d741cdb --- /dev/null +++ b/user/llvm14/roundeven.patch @@ -0,0 +1,49 @@ +--- llvm-14.0.4.src/lib/Analysis/TargetLibraryInfo.cpp.old 2022-05-24 22:02:58.000000000 +0000 ++++ llvm-14.0.4.src/lib/Analysis/TargetLibraryInfo.cpp 2022-07-06 01:38:22.016862561 +0000 +@@ -588,6 +588,13 @@ + TLI.setUnavailable(LibFunc_statvfs64); + TLI.setUnavailable(LibFunc_tmpfile64); + ++ // These functions are unavailable on musl. ++ if (T.isMusl()) { ++ TLI.setUnavailable(LibFunc_roundeven); ++ TLI.setUnavailable(LibFunc_roundevenf); ++ TLI.setUnavailable(LibFunc_roundevenl); ++ } ++ + // Relaxed math functions are included in math-finite.h on Linux (GLIBC). + // Note that math-finite.h is no longer supported by top-of-tree GLIBC, + // so we keep these functions around just so that they're recognized by +--- llvm-14.0.4.src/test/Transforms/InstCombine/double-float-shrink-2.ll.old 2022-05-24 22:02:58.000000000 +0000 ++++ llvm-14.0.4.src/test/Transforms/InstCombine/double-float-shrink-2.ll 2022-07-06 02:03:20.657791057 +0000 +@@ -1,5 +1,5 @@ + ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py +-; RUN: opt < %s -instcombine -S -mtriple "i386-pc-linux" | FileCheck %s ++; RUN: opt < %s -instcombine -S -mtriple "i386-pc-linux-gnu" | FileCheck %s + ; RUN: opt < %s -instcombine -S -mtriple "i386-pc-win32" | FileCheck %s + ; RUN: opt < %s -instcombine -S -mtriple "x86_64-pc-win32" | FileCheck %s + ; RUN: opt < %s -instcombine -S -mtriple "i386-pc-mingw32" | FileCheck %s +--- llvm-14.0.4.src/test/ExecutionEngine/Interpreter/intrinsics.ll.old 2022-05-24 22:02:58.000000000 +0000 ++++ llvm-14.0.4.src/test/ExecutionEngine/Interpreter/intrinsics.ll 2022-07-23 06:50:59.336665672 +0000 +@@ -13,8 +13,8 @@ + declare double @llvm.trunc.f64(double) + declare float @llvm.round.f32(float) + declare double @llvm.round.f64(double) +-declare float @llvm.roundeven.f32(float) +-declare double @llvm.roundeven.f64(double) ++;declare float @llvm.roundeven.f32(float) ++;declare double @llvm.roundeven.f64(double) + declare float @llvm.copysign.f32(float, float) + declare double @llvm.copysign.f64(double, double) + +@@ -31,8 +31,8 @@ + %trunc64 = call double @llvm.trunc.f64(double 0.000000e+00) + %round32 = call float @llvm.round.f32(float 0.000000e+00) + %round64 = call double @llvm.round.f64(double 0.000000e+00) +- %roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00) +- %roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00) ++ ;%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00) ++ ;%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00) + %copysign32 = call float @llvm.copysign.f32(float 0.000000e+00, float 0.000000e+00) + %copysign64 = call double @llvm.copysign.f64(double 0.000000e+00, double 0.000000e+00) + ret i32 0 -- cgit v1.2.3-60-g2f50