This is an archive of the discontinued LLVM Phabricator instance.

[Sema] Sanity-check alignment requested via `__attribute__((assume_aligned(imm)))`
ClosedPublic

Authored by lebedev.ri on Jan 19 2020, 2:31 AM.

Details

Summary

For __builtin_assume_aligned(), we do validate that the alignment
is not greater than 536870912 (D68824), but we don't do that for
__attribute__((assume_aligned(N))) attribute.
I suspect we should.

Diff Detail

Event Timeline

lebedev.ri created this revision.Jan 19 2020, 2:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 19 2020, 2:31 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
lebedev.ri retitled this revision from [Sema] Sanitize alignment requested via `__attribute__((assume_aligned(imm)))` to [Sema] Sanity-check alignment requested via `__attribute__((assume_aligned(imm)))`.Jan 19 2020, 2:34 AM
erichkeane accepted this revision.Jan 23 2020, 9:14 AM

LGTM. note to other reviewers, D72998 fixes the max alignment constant in this.

This revision is now accepted and ready to land.Jan 23 2020, 9:14 AM

LGTM. note to other reviewers, D72998 fixes the max alignment constant in this.

Thank you for the review!

Rebased, NFC.

lebedev.ri reopened this revision.Jan 23 2020, 12:11 PM

Seeing some bot failures, reverted this one.

This revision is now accepted and ready to land.Jan 23 2020, 12:11 PM
This revision was automatically updated to reflect the committed changes.