llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-backend-arm Author: Matt Arsenault (arsenm) <details> <summary>Changes</summary> The current predicate system is primitive, we ought to have a way to list a chain of alternatives. --- Full diff: https://github.com/llvm/llvm-project/pull/164591.diff 1 Files Affected: - (modified) llvm/include/llvm/IR/RuntimeLibcalls.td (+12-2) ``````````diff diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.td b/llvm/include/llvm/IR/RuntimeLibcalls.td index 243b864ccf033..c9e08e844f2a0 100644 --- a/llvm/include/llvm/IR/RuntimeLibcalls.td +++ b/llvm/include/llvm/IR/RuntimeLibcalls.td @@ -2450,6 +2450,11 @@ def _aullrem : RuntimeLibcallImpl<UREM_I64>; def _allmul : RuntimeLibcallImpl<MUL_I64>; } +// FIXME: Should have utility function to filter by known provider. +defvar WindowsDivRemMulLibcallOverrides = [ + __divdi3, __udivdi3, __moddi3, __umoddi3, __muldi3 +]; + //===----------------------------------------------------------------------===// // X86 Runtime Libcalls //===----------------------------------------------------------------------===// @@ -2471,7 +2476,7 @@ defvar X86_F128_Libcalls = LibcallImpls<(add LibmF128Libcalls, LibmF128FiniteLib defvar SinCosF32F64Libcalls = LibcallImpls<(add sincosf, sincos), hasSinCos_f32_f64>; defvar X86CommonLibcalls = - (add WinDefaultLibcallImpls, + (add (sub WinDefaultLibcallImpls, WindowsDivRemMulLibcallOverrides), DarwinSinCosStret, DarwinExp10, X86_F128_Libcalls, LibmHasSinCosF80, // FIXME: Depends on long double @@ -2494,10 +2499,15 @@ defvar Windows32DivRemMulCalls = LibcallsWithCC<(add WindowsDivRemMulLibcalls), X86_STDCALL, RuntimeLibcallPredicate<"TT.isWindowsMSVCEnvironment() || TT.isWindowsItaniumEnvironment()">>; +defvar NotWindows32DivRemMulCalls = + LibcallImpls<(add WindowsDivRemMulLibcallOverrides), + RuntimeLibcallPredicate<"!TT.isWindowsMSVCEnvironment() && !TT.isWindowsItaniumEnvironment()">>; + def X86_32SystemLibrary : SystemRuntimeLibrary<isX86_32, (add X86CommonLibcalls, - Windows32DivRemMulCalls)>; + NotWindows32DivRemMulCalls, + Windows32DivRemMulCalls)>; def X86_64SystemLibrary : SystemRuntimeLibrary<isX86_64, `````````` </details> https://github.com/llvm/llvm-project/pull/164591 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
