Issue |
137162
|
Summary |
[AArch64] can use XAR for vector rotates where possible
|
Labels |
new issue
|
Assignees |
|
Reporter |
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
G1 (v2di r) {
return (r >> 39) | (r << 25);
}
v4si
G2 (v4si r) {
return (r >> 23) | (r << 9);
}
v8hi
G3 (v8hi r) {
return (r >> 5) | (r << 11);
}
v16qi
G4 (v16qi r)
{
return (r << 2) | (r >> 6);
}
v2si
G5 (v2si r) {
return (r >> 22) | (r << 10);
}
v4hi
G6 (v4hi r) {
return (r >> 7) | (r << 9);
}
v8qi
G7 (v8qi r)
{
return (r << 3) | (r >> 5);
}
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs