-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[MachineVerifier] Improve checks for G_INSERT_SUBVECTOR. #109209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Cleanup messages. Remove redundant checks that are handled in geneirc code. Add overrun check. Add checks that subvector is smaller than the vector.
✅ With the latest revision this PR passed the C/C++ code formatter. |
@@ -11,9 +11,11 @@ body: | | |||
%1:_(<vscale x 2 x s32>) = G_IMPLICIT_DEF | |||
%2:_(<vscale x 1 x s32>) = G_IMPLICIT_DEF | |||
|
|||
; CHECK: generic instruction must use register operands |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this supposed to say generic instruction must use register operands
? looks unrelated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anything that has a type declared in the .td automatically generates a check that the operand is a register. This handles a significant portion of the generic instructions like G_ADD, G_FADD without writing any custom code.
I was going to remove the error from G_INSERT_SUBVECTOR and G_EXTRACT_SUBVECTOR, but we need the call to isReg()
to avoid an assert in getReg()
later. The assert will crash the test without letting us get through all the test cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
-Improve messages. -Remove redundant checks that are handled in generic code. -Add check that the subvector is smaller than the vector. -Add checks that subvector is smaller than the vector.
Cleanup messages.
Remove redundant checks that are handled in generic code.
Add overrun check.
Add checks that subvector is smaller than the vector.