This is an archive of the discontinued LLVM Phabricator instance.

[Local] Simplify the alignment limits in getOrEnforceKnownAlignment. NFCI
ClosedPublic

Authored by craig.topper on Apr 18 2020, 1:08 AM.

Details

Summary

We previously clamped the trailing zero count to 31 bits. And
then clamped the final alignment to MaximumAlignment which is
1 << 29.

This patch simplifies this to just clamp the trailing zero to
29 using MaxAlignmentExponent.

I was looking into changin this function to use Align/MaybeAlign
and noticed this.

Diff Detail

Event Timeline

craig.topper created this revision.Apr 18 2020, 1:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 18 2020, 1:08 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
lebedev.ri accepted this revision.Apr 18 2020, 1:39 AM
lebedev.ri added a subscriber: lebedev.ri.

LG

This revision is now accepted and ready to land.Apr 18 2020, 1:39 AM
This revision was automatically updated to reflect the committed changes.