This is an archive of the discontinued LLVM Phabricator instance.

[LangRef][VP] Document vp.load and vp.store intrinsics
ClosedPublic

Authored by frasercrmck on Nov 1 2021, 7:52 AM.

Details

Summary

This patch fleshes out the missing documentation for two of the VP
intrinsics introduced in D99355: llvm.vp.load and llvm.vp.store. It
does so mostly by deferring to the llvm.masked.load and
llvm.masked.store intrinsics, respectively.

Diff Detail

Event Timeline

frasercrmck created this revision.Nov 1 2021, 7:52 AM
frasercrmck requested review of this revision.Nov 1 2021, 7:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 1 2021, 7:52 AM

fix typos
add missing pointer mangling to examples

simoll added inline comments.Nov 2 2021, 7:45 AM
llvm/docs/LangRef.rst
19699

It should suffice to say that alignment is derived the same way it is for regular load/store instructions (eg https://llvm.org/docs/LangRef.html#load-instruction).
For example, there is also an align attribute for specifying the alignment (https://llvm.org/docs/LangRef.html#parameter-attributes).

frasercrmck added inline comments.Nov 2 2021, 8:02 AM
llvm/docs/LangRef.rst
19699

From what I can tell our current lowering of vp.load and vp.store don't check any align attributes. In SelectionDAGBuilder.cpp, we just do MaybeAlign Alignment = DAG.getEVTAlign(VT); I remember talk of obeying this attribute, but I don't think we should document anything that isn't currently true.

Shall I open a patch to use these attributes first, perhaps? Then document what we want to see happen?

simoll added inline comments.Nov 2 2021, 9:10 AM
llvm/docs/LangRef.rst
19699

It's reasonable to stick with the current phrasing for this patch. Then, prepare another patch for SelectionDAG builder and LangRef that considers the align attribute.

frasercrmck added inline comments.Nov 2 2021, 10:35 AM
llvm/docs/LangRef.rst
19699

Yep okay, that makes sense. Cheers.

simoll accepted this revision.Nov 5 2021, 1:43 AM
This revision is now accepted and ready to land.Nov 5 2021, 1:43 AM
This revision was landed with ongoing or failed builds.Nov 5 2021, 3:48 AM
This revision was automatically updated to reflect the committed changes.