-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[AArch64] can use XAR for vector rotates where possible #137162
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
Comments
@llvm/issue-subscribers-backend-aarch64 Author: None (k-arrows)
Here is the code from gcc testsuite.
https://godbolt.org/z/fejTchexj
```c
typedef char __attribute__ ((vector_size (16))) v16qi;
typedef unsigned short __attribute__ ((vector_size (16))) v8hi;
typedef unsigned int __attribute__ ((vector_size (16))) v4si;
typedef unsigned long long __attribute__ ((vector_size (16))) v2di;
typedef char __attribute__ ((vector_size (8))) v8qi;
typedef unsigned short __attribute__ ((vector_size (8))) v4hi;
typedef unsigned int __attribute__ ((vector_size (8))) v2si;
v2di v4si v8hi v16qi v2si v4hi v8qi
|
AArch64DAGToDAGISel::trySelectXAR could be updated where the xor is not present, generating a mov 0 instead. |
Hi! This issue may be a good introductory issue for people new to working on LLVM. If you would like to work on this issue, your first steps are:
If you have any further questions about this issue, don't hesitate to ask via a comment in the thread below. |
@llvm/issue-subscribers-good-first-issue Author: None (k-arrows)
Here is the code from gcc testsuite.
https://godbolt.org/z/fejTchexj
```c
typedef char __attribute__ ((vector_size (16))) v16qi;
typedef unsigned short __attribute__ ((vector_size (16))) v8hi;
typedef unsigned int __attribute__ ((vector_size (16))) v4si;
typedef unsigned long long __attribute__ ((vector_size (16))) v2di;
typedef char __attribute__ ((vector_size (8))) v8qi;
typedef unsigned short __attribute__ ((vector_size (8))) v4hi;
typedef unsigned int __attribute__ ((vector_size (8))) v2si;
v2di v4si v8hi v16qi v2si v4hi v8qi
|
Hi, I'm new to LLVM community, do you think if I can try fixing this issue? ✋ |
Sure thing - let us know if you run into any issues. |
@davemgreen |
Can you explain what you mean? |
I was facing an assertion error so was just making sure I understood the transformation correctly. I presume the OR result should be equal to the ROTR result? More info in the changes I made. |
Resolves llvm#137162 For cases when there isn't any `XOR` in the transformation, replace with a zero register.
I'm sorry, I was a little busy with my work priorities, seems like someone has already sent a patch fixing the issue? |
Resolves llvm#137162 For cases when there isn't any `XOR` in the transformation, replace with a zero register.
Resolves llvm#137162 For cases when there isn't any `XOR` in the transformation, replace with a zero register.
@davemgreen , kindly let me know if there is a guideline about a timeline within which I've to complete an issue, otherwise the issue can be taken up by someone else in llvm project, even though the issue is assigned to me? Also, let me know if I now should be looking at some other issue instead maybe? |
Resolves llvm#137162 For cases when there isn't any `XOR` in the transformation, replace with a zero register.
Resolves llvm#137162 For cases when there isn't any `XOR` in the transformation, replace with a zero register.
@gxyd Sorry, I'm not sure I'm afraid. The only details I found were the brief details in https://www.llvm.org/docs/Contributing.html#bug-fixes. As you might imagine, we get some people sign up for first time issues only to disappear into the void never to be heard from again. The usual process is that if someone else is interested they ping the issue and checks if it is still being working on, or if the person has become busy with other things. If you want something else to look into, perhaps #119921 is a good one that requires some new tablegen patterns. @Rajveer100 I wasn't sure what the output meant exactly, perhaps explain more about what you are trying to prove if you still need to. I'm pretty sure the transform is OK. It looks like your patch is a good start, I'll comment there. |
Understood, really appreciate the response. Then I'll un-assign myself from this issue, and once I've more bandwidth I'll work more actively. |
Resolves llvm#137162 For cases when there isn't any `XOR` in the transformation, replace with a zero register.
Resolves llvm#137162 For cases when there isn't any `XOR` in the transformation, replace with a zero register.
Resolves llvm#137162 For cases when there isn't any `XOR` in the transformation, replace with a zero register.
Resolves llvm#137162 For cases when there isn't any `XOR` in the transformation, replace with a zero register.
Resolves llvm#137162 For cases when there isn't any `XOR` in the transformation, replace with a zero register.
Resolves llvm#137162 For cases when there isn't any `XOR` in the transformation, replace with a zero register.
Resolves llvm#137162 For cases when there isn't any `XOR` in the transformation, replace with a zero register.
Resolves llvm#137162 For cases when there isn't any `XOR` in the transformation, replace with a zero register.
Resolves llvm#137162 For cases when there isn't any `XOR` in the transformation, replace with a zero register.
Resolves #137162 For cases when there isn't any `XOR` in the transformation, replace with a zero register.
I created #139229 as a followup if you are interested in making more of the fixed-width types work too. Thanks |
Here is the code from gcc testsuite.
https://godbolt.org/z/fejTchexj
The text was updated successfully, but these errors were encountered: