This adds a testcase for PR124491, which was fixed by backporting the
following commits to the 15 branch:

r16-6709-ga4716ece529dfd29d169ccc96979f7c747231f25
r16-6743-ge787d5ace5cc315892868f3e5e2a2a16fd31bcc8

as:

g:fad99a08936 middle-end/123573 - fix VEC_PERM folding more
g:bebd813a400 middle-end/123175 - fix parts of const VEC_PERM with relaxed 
input sizes

The test fails on releases/gcc-15 without the above backports but passes
with them.  The middle-end backports were pre-approved in the PR and are
now pushed to releases/gcc-15.

I've also pushed this patch (adding the test) to the branch as obvious.

Thanks,
Alex

gcc/testsuite/ChangeLog:

        PR middle-end/124491
        * gcc.target/aarch64/torture/pr124491.c: New test.
diff --git a/gcc/testsuite/gcc.target/aarch64/torture/pr124491.c 
b/gcc/testsuite/gcc.target/aarch64/torture/pr124491.c
new file mode 100644
index 00000000000..1fcad73b670
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/torture/pr124491.c
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv8.2-a+sve -msve-vector-bits=256" } */
+#include <arm_sve.h>
+svint64_t foo(long x, long y) {
+  return svdupq_n_s64(x, y);
+}

Reply via email to