-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[GlobalISel] Add G_ABDS and G_ABDU instructions #118122
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
Changes from 4 commits
9f929ff
fb0454a
07cce36
9bb15cb
c640bea
ad8b237
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # RUN: not --crash llc -verify-machineinstrs -mtriple=arm64 -run-pass none -o /dev/null %s 2>&1 | FileCheck %s | ||
| # REQUIRES: aarch64-registered-target | ||
|
|
||
| --- | ||
| name: g_abd_su | ||
| body: | | ||
| bb.0: | ||
| %2:_(p0) = G_IMPLICIT_DEF | ||
| %3:_(p0) = G_IMPLICIT_DEF | ||
| ; CHECK: Generic abds/abdu does not support pointers as operands | ||
| %4:_(s1) = G_ABDS %2, %3 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing the error check?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed the C++ error checking code under the assumption that the parameters are types and not ptypes and some other part of the system checks for misbehaviour.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But that does not remove the need to check that the correct error is produced. I also see the case with a pointer type in each operand is not rejected |
||
| %12:_(s64) = G_IMPLICIT_DEF | ||
| %13:_(s64) = G_IMPLICIT_DEF | ||
| ; CHECK: Generic abds/abdu does not support pointers as a result | ||
| %14:_(p0) = G_ABDS %12, %13 | ||
| %23:_(<2 x s32>) = G_IMPLICIT_DEF | ||
| %24:_(<2 x s32>) = G_IMPLICIT_DEF | ||
| ; CHECK: Generic vector abds/abdu must preserve number of lanes | ||
| %5:_(s1) = G_ABDU %23, %24 | ||
| %15:_(s32) = G_CONSTANT i32 0 | ||
| %16:_(s64) = G_CONSTANT i64 2 | ||
| ; CHECK: Generic abds/abdu must have same input types | ||
| %17:_(s1) = G_ABDU %15, %16 | ||
| %18:_(s64) = G_CONSTANT i64 0 | ||
| %19:_(s64) = G_CONSTANT i64 2 | ||
| ; CHECK: Generic abds/abdu must have same input and output types | ||
| %20:_(s1) = G_ABDU %18, %19 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe check vector of pointer since that manages to always break |
||
| ... | ||
|
|
||
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.
Does this not get verified by default? I thought there were separate type and ptype to distinguish them
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.
Good point. It was copy-pasted/inspired by the G_SCMP and G_USCMP nearby.