Skip to content

Conversation

@vporpo
Copy link

@vporpo vporpo commented Jul 22, 2024

This patch implements sandboxir::SelectInst which mirrors llvm::SelectInst.

@vporpo
Copy link
Author

vporpo commented Jul 22, 2024

I just realized I need to add some tests to exercise the create() functions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a createCommon here too like ReturnInst to capture the duplication?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be worth checking *(BB->end())->getOpcodeName() == Select here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this is automatically handled by the .def files, so it shouldn't normally be wrong. But yeah, at some point we should check this too.
It will be checked once we add tests for the dump() functions for the whole class hierarchy in a future patch.

Copy link
Member

@tmsri tmsri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine after addressing some minor comments. Very similar to other instruction classes.

This patch implements sandboxir::SelectInst which mirrors llvm::SelectInst.
@vporpo vporpo merged commit 73ffeea into llvm:main Jul 23, 2024
yuxuanchen1997 pushed a commit that referenced this pull request Jul 25, 2024
Summary:
This patch implements sandboxir::SelectInst which mirrors
llvm::SelectInst.

Test Plan: 

Reviewers: 

Subscribers: 

Tasks: 

Tags: 


Differential Revision: https://phabricator.intern.facebook.com/D60250785
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants