This is an archive of the discontinued LLVM Phabricator instance.

[X86] Disable muloti4 libcalls for x86-64.
ClosedPublic

Authored by craig.topper on Sep 7 2021, 12:34 PM.

Details

Summary

This library function only exists in compiler-rt not libgcc. So
this would fail to link unless we were linking with compiler-rt.

This is consistent with the recent removal of calls to mulodi4 on
32-bit targets like D108928.

I suppose maybe we could keep the libcalls for platforms like
Darwin that use compiler-rt exclusively?

Diff Detail

Event Timeline

craig.topper created this revision.Sep 7 2021, 12:34 PM
craig.topper requested review of this revision.Sep 7 2021, 12:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 7 2021, 12:34 PM

The optimal would be IFF we know we are linking against a compiler runtime, then we really really would like to generate the libcall. @rengolin summarizes this best here: https://github.com/ClangBuiltLinux/linux/issues/1438#issuecomment-907689836. That said, I'm worried about how can we know whether that's the case or not, and can we still know under LTO?

nickdesaulniers accepted this revision.Sep 7 2021, 12:55 PM

This library function only exists in compiler-rt not libgcc.

I'd like to verify that. The docs for these in GCC don't mention muloti4. Indeed, the sources for GCC have no reference to muloti4.

This revision is now accepted and ready to land.Sep 7 2021, 12:55 PM
MaskRay accepted this revision.Sep 7 2021, 1:14 PM

r133284 says "Fixes rdar://9219742 and rdar://9218244"

Consider asking an Apple folk whether __muloti4 is wanted on Darwin.

r133284 says "Fixes rdar://9219742 and rdar://9218244"

Consider asking an Apple folk whether __muloti4 is wanted on Darwin.

@dexonsmith @paquette @rjmccall can you help here?

This revision was landed with ongoing or failed builds.Sep 9 2021, 10:03 AM
This revision was automatically updated to reflect the committed changes.