This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen] Always expand division larger than i128
ClosedPublic

Authored by nikic on Feb 27 2023, 6:30 AM.

Details

Summary

Default MaxDivRemBitWidthSupported to 128, so that divisions larger than 128 bits are always expanded, without requiring additional configuration from the target.

Note that this may still emit calls to __udivti3 on 32-bit targets, which likely don't have an implementation of that builtin. However, I believe this is sufficient to fix https://github.com/llvm/llvm-project/issues/60531, because Zig must already be defining those builtins.

Diff Detail

Event Timeline

nikic created this revision.Feb 27 2023, 6:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 27 2023, 6:30 AM
nikic requested review of this revision.Feb 27 2023, 6:30 AM

The change looks correct. Let's wait for somebody else to give their final approval.

This revision is now accepted and ready to land.Feb 28 2023, 2:16 PM
This revision was landed with ongoing or failed builds.Mar 1 2023, 6:33 AM
This revision was automatically updated to reflect the committed changes.