]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
vect: add testcase from [PR123043]
authorTamar Christina <tamar.christina@arm.com>
Mon, 15 Dec 2025 09:34:43 +0000 (09:34 +0000)
committerTamar Christina <tamar.christina@arm.com>
Mon, 15 Dec 2025 09:34:43 +0000 (09:34 +0000)
Adding tests to testsuite, fixed by gcc-16-6031-g8aa4ef38bd1

gcc/testsuite/ChangeLog:

PR tree-optimization/123043
* gcc.dg/vect/pr123043.c: New test.

gcc/testsuite/gcc.dg/vect/pr123043.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/vect/pr123043.c b/gcc/testsuite/gcc.dg/vect/pr123043.c
new file mode 100644 (file)
index 0000000..03d0336
--- /dev/null
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-final { scan-tree-dump "loop vectorized" "vect" } } */
+/* { dg-additional-options "-O3 -mgeneral-regs-only" { target aarch64*-*-* } } */
+/* { dg-additional-options "-O3 -m32 -mno-sse" { target {  { i?86-*-* x86_64-*-* } && ilp32 } } } */
+/* { dg-additional-options "-w" } */
+
+char sad_memcpy_pout;
+int inflate_fast_len;
+void inflate_fast() {
+  char *out = &sad_memcpy_pout, *from;
+  do {
+    *out++ = *from++;
+    *out++ = *from++;
+    inflate_fast_len -= 3;
+  } while (inflate_fast_len > 2);
+}