[gcc(refs/vendors/vrull/heads/slp-improvements)] Add testcase for #344
Philipp Tomsich
ptomsich@gcc.gnu.org
Wed Jan 17 19:14:46 GMT 2024
https://gcc.gnu.org/g:d485750f65c85aa2af916824e1fd434bc360d095
commit d485750f65c85aa2af916824e1fd434bc360d095
Author: Manolis Tsamis <manolis.tsamis@vrull.eu>
Date: Tue Nov 28 15:31:17 2023 +0100
Add testcase for #344
Diff:
---
gcc/testsuite/gcc.target/aarch64/vins_uzp.c | 36 +++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gcc/testsuite/gcc.target/aarch64/vins_uzp.c b/gcc/testsuite/gcc.target/aarch64/vins_uzp.c
new file mode 100644
index 00000000000..d82d1f43c15
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vins_uzp.c
@@ -0,0 +1,36 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-require-effective-target aarch64_little_endian } */
+
+typedef int v4si __attribute__ ((vector_size (4 * sizeof (int))));
+
+v4si case1(v4si a, v4si b) {
+ return __builtin_shufflevector (a, b, 0, 5, 0, 5);
+}
+
+v4si case2(v4si a, v4si b) {
+ return __builtin_shufflevector (a, b, 1, 5, 1, 5);
+}
+
+v4si case3(v4si a, v4si b) {
+ return __builtin_shufflevector (a, b, 0, 6, 0, 6);
+}
+
+v4si case4(v4si a, v4si b) {
+ return __builtin_shufflevector (a, b, 1, 7, 1, 7);
+}
+
+v4si case5(v4si a, v4si b) {
+ return __builtin_shufflevector (a, b, 2, 7, 2, 7);
+}
+
+v4si case6(v4si a, v4si b) {
+ return __builtin_shufflevector (b, a, 2, 7, 2, 7);
+}
+
+v4si case7(v4si a, v4si b) {
+ return __builtin_shufflevector (a, b, 7, 2, 7, 2);
+}
+
+/* { dg-final { scan-assembler-not {\ttbl\t} } } */
+/* { dg-final { scan-assembler-not {\tldr\t} } } */
More information about the Gcc-cvs
mailing list