This is an archive of the discontinued LLVM Phabricator instance.

[DOCS] Added example for G_EXTRACT and G_INSERT
ClosedPublic

Authored by sushmaunnibhavi on Apr 24 2021, 12:57 AM.

Diff Detail

Event Timeline

sushmaunnibhavi requested review of this revision.Apr 24 2021, 12:57 AM
sushmaunnibhavi created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptApr 24 2021, 12:57 AM

Thanks, @sushmaunnibhavi for the patch!

I think the examples you add are for https://llvm.org/docs/GlobalISel/GenericOpcode.html#vector-specific-operations.

For scalar one you should look at /llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-extract.mir and /llvm-project/llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-insert.mir.

xgupta retitled this revision from Added example for G_EXTRACT and G_INSERT [DOCS] to [DOCS] Added example for G_EXTRACT and G_INSERT.Apr 24 2021, 1:42 AM
xgupta added reviewers: arsenm, gargaroff.

@sushmaunnibhavi, I can't apply your updated patch. I think you should first rebase your branch with LLVM upstream main.
There is a recent tutorial (https://reviews.llvm.org/D100714) on the contribution that also talks about arc uses.

Or if you are updating diff from Phabticator GUI, make sure you follow the steps mentions here -https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface.
But I think using arc (command line) is a better way.

Or if you are updating diff from Phabticator GUI, make sure you follow the steps mentions here -https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface.
But I think using arc (command line) is a better way.

Yes I did it now, can you please check?

xgupta accepted this revision.Apr 24 2021, 4:24 AM

LGTM!

This revision is now accepted and ready to land.Apr 24 2021, 4:24 AM

Whenever you make changes to docs, make sure you run make docs-llvm-html before updating the revision.

llvm/docs/GlobalISel/GenericOpcode.rst
190

A line break is needed between these two lines

199

same here and %5 should be shifted two keystrokes right for indentation.

Whenever you make changes to docs, make sure you run make docs-llvm-html before updating the revision.

Okay I will do it.

gargaroff added inline comments.Apr 29 2021, 11:44 PM
llvm/docs/GlobalISel/GenericOpcode.rst
191

I think you should add the type for %2 to make it clear that this changes the type. I.e. %2:_(s64)

200

And same here.

@gargaroff Is the patch looks good?

gargaroff accepted this revision.May 3 2021, 12:35 AM

With the nit fixed, this should be good to go. Thanks!

llvm/docs/GlobalISel/GenericOpcode.rst
200

Add the type for %0 as well to make it clear that this is the same type as the result.

Added type for %0 in G_INSERT operation

This revision was landed with ongoing or failed builds.May 5 2021, 3:19 AM
This revision was automatically updated to reflect the committed changes.
xgupta added a comment.May 5 2021, 3:20 AM

Congratulations