This bug was fixed by r16-7941-g2a155ceffe6639. The testcase is
different as this is an ICE rather than wrong code. So it seems
like a good idea to add a testcase for it.

Pushed as obvious after testing to make sure the new testcase
works for aarch64-linux-gnu.

        PR rtl-optimization/123094

gcc/testsuite/ChangeLog:

        * gcc.target/aarch64/pr123094-1.c: New test.

Signed-off-by: Andrew Pinski <[email protected]>
---
 gcc/testsuite/gcc.target/aarch64/pr123094-1.c | 23 +++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 gcc/testsuite/gcc.target/aarch64/pr123094-1.c

diff --git a/gcc/testsuite/gcc.target/aarch64/pr123094-1.c 
b/gcc/testsuite/gcc.target/aarch64/pr123094-1.c
new file mode 100644
index 00000000000..f075c84dc8a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr123094-1.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv9-a -O2" } */
+
+/* PR rtl-optimization/123094 */
+
+typedef long a;
+typedef a __attribute__((vector_size(2 * sizeof(a)))) b;
+typedef a __attribute__((vector_size(4 * sizeof(a)))) c;
+typedef a __attribute__((vector_size(8 * sizeof(a)))) d;
+a e;
+int f, h;
+d g;
+[[gnu::noinline]] void j(b) {
+  h = 1;
+}
+c k() {
+  if (e)
+    if (f)
+      return (c){3};
+  j((b){1});
+  d l = {1, 1, 1, 1, 1, 1, 1};
+  return __builtin_shufflevector(l, g, 2, 11, 4, 6);
+}
-- 
2.43.0

Reply via email to