courbet accepted this revision.
courbet added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/docs/LangRef.rst:14945
-The first operand is the base pointer for the load. The second operand is the
alignment of the source location. It must be a constant integer value. The
third operand, mask, is a vector of boolean values with the same number of
elements as the return type. The fourth is a pass-through value that is used to
fill the masked-off lanes of the result. The return type, underlying type of
the base pointer and the type of the '``passthru``' operand are the same vector
types.
-
+The first operand is the base pointer for the load. The second operand is the
alignment of the source location. It must be a power of two constant integer
value. The third operand, mask, is a vector of boolean values with the same
number of elements as the return type. The fourth is a pass-through value that
is used to fill the masked-off lanes of the result. The return type, underlying
type of the base pointer and the type of the '``passthru``' operand are the
same vector types.
----------------
Let's commit this as a base change, as this is just documenting what the
verifier is already checking.
================
Comment at: llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp:2907
Value *Addr = I.getArgOperand(1);
- const MaybeAlign Alignment(
+ const Align Alignment(
cast<ConstantInt>(I.getArgOperand(2))->getZExtValue());
----------------
gchatelet wrote:
> courbet wrote:
> > I think it's actually OK for this one to be a `MaybeAlign`, e.g. in
> > `ARMTTIImpl::isLegalMaskedLoad`.
> As discussed offline
> [Verifier.cpp](https://github.com/llvm-mirror/llvm/blob/2c4ca6832fa6b306ee6a7010bfb80a3f2596f824/lib/IR/Verifier.cpp#L4613)
> requires the alignment to be set for both `masked_load` and `masked_store`
> intrinsics. I've updated the documentation.
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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73106/new/
https://reviews.llvm.org/D73106
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits