This is an archive of the discontinued LLVM Phabricator instance.

[builtins] Add option to always build int128 routines
ClosedPublic

Authored by smeenai on Feb 28 2023, 1:23 PM.

Details

Summary

32-bit targets don't build these by default, but e.g. armv7 and x86 can
build them just fine, and it's useful to have the int128 routines
available for certain applications. Add a CMake option to let us include
the int128 routines for architectures which would otherwise lack them.

Diff Detail

Event Timeline

smeenai created this revision.Feb 28 2023, 1:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2023, 1:23 PM
smeenai requested review of this revision.Feb 28 2023, 1:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2023, 1:23 PM
Herald added subscribers: Restricted Project, pcwang-thead. · View Herald Transcript
compnerd accepted this revision.Feb 28 2023, 3:06 PM
compnerd added inline comments.
compiler-rt/lib/builtins/CMakeLists.txt
738

I think I prefer COMPILER_RT_ENABLE_SOFTWARE_INT128 as this would enable the software fallbacks for 128-bit integers right?

This revision is now accepted and ready to land.Feb 28 2023, 3:06 PM
smeenai added inline comments.Feb 28 2023, 3:08 PM
compiler-rt/lib/builtins/CMakeLists.txt
738

Yup, sounds good.

MaskRay accepted this revision.Feb 28 2023, 3:09 PM
smeenai updated this revision to Diff 501302.Feb 28 2023, 3:10 PM
smeenai marked an inline comment as done.

Rename per review comment

phosek accepted this revision.Feb 28 2023, 3:20 PM

LGTM

This revision was automatically updated to reflect the committed changes.