This is an archive of the discontinued LLVM Phabricator instance.

[Alignment][NFC] Use Align with CreateMaskedStore
ClosedPublic

Authored by gchatelet on Jan 21 2020, 7:13 AM.

Details

Summary

This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Event Timeline

gchatelet created this revision.Jan 21 2020, 7:13 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJan 21 2020, 7:13 AM
courbet added inline comments.Jan 21 2020, 7:31 AM
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
2907

I think it's actually OK for this one to be a MaybeAlign, e.g. in ARMTTIImpl::isLegalMaskedLoad.

2937

ditto

gchatelet marked an inline comment as done.
  • Address comments
gchatelet marked 2 inline comments as done.Jan 22 2020, 12:39 AM
gchatelet added inline comments.
llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
2907

As discussed offline Verifier.cpp requires the alignment to be set for both masked_load and masked_store intrinsics. I've updated the documentation.

courbet accepted this revision.Jan 22 2020, 1:07 AM
courbet added inline comments.
llvm/docs/LangRef.rst
14945

Let's commit this as a base change, as this is just documenting what the verifier is already checking.

llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
2907

There is still the issue of already serialized bitcode files: as discussed, these are not an issue wrt this patch as they do not touch the API directly, will still generate a 0 align that will be caught by the verifier.

This revision is now accepted and ready to land.Jan 22 2020, 1:07 AM
gchatelet updated this revision to Diff 239513.Jan 22 2020, 1:40 AM
gchatelet marked an inline comment as done.
  • Reverting LangRef
gchatelet marked an inline comment as done.Jan 22 2020, 1:41 AM
gchatelet marked an inline comment as done.Jan 22 2020, 1:47 AM
gchatelet added inline comments.
This revision was automatically updated to reflect the committed changes.