aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r--gcc/testsuite/gcc.dg/completion-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-clone-4.c30
-rw-r--r--gcc/testsuite/gcc.dg/memcpy-4.c7
-rw-r--r--gcc/testsuite/gcc.dg/pr116357.c6
-rw-r--r--gcc/testsuite/gcc.dg/pr116479.c26
-rw-r--r--gcc/testsuite/gcc.dg/pr118947-1.c15
-rw-r--r--gcc/testsuite/gcc.dg/pr78408-3.c14
-rw-r--r--gcc/testsuite/gcc.dg/raw-string-1.c25
-rw-r--r--gcc/testsuite/gcc.dg/rtl/i386/vector_eq-2.c71
-rw-r--r--gcc/testsuite/gcc.dg/rtl/i386/vector_eq-3.c74
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/ipa-cp-1.c30
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr118902-1.c21
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-52.c30
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-53.c26
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-54.c25
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-early-break_38.c1
17 files changed, 393 insertions, 11 deletions
diff --git a/gcc/testsuite/gcc.dg/completion-2.c b/gcc/testsuite/gcc.dg/completion-2.c
index 46c511c..99e6531 100644
--- a/gcc/testsuite/gcc.dg/completion-2.c
+++ b/gcc/testsuite/gcc.dg/completion-2.c
@@ -5,7 +5,6 @@
-flto-partition=1to1
-flto-partition=balanced
-flto-partition=cache
--flto-partition=default
-flto-partition=max
-flto-partition=none
-flto-partition=one
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-clone-4.c b/gcc/testsuite/gcc.dg/ipa/ipa-clone-4.c
new file mode 100644
index 0000000..bf74e64
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-clone-4.c
@@ -0,0 +1,30 @@
+/* { dg-options "-O3 -fdump-ipa-cp" } */
+__attribute__ ((used))
+int a[1000];
+
+__attribute__ ((noinline))
+void
+test2(int sz)
+{
+ for (int i = 0; i < sz; i++)
+ a[i]++;
+ asm volatile (""::"m"(a));
+}
+
+__attribute__ ((noinline))
+void
+test1 (int sz)
+{
+ for (int i = 0; i < 1000; i++)
+ test2(sz);
+}
+int main()
+{
+ test1(1000);
+ return 0;
+}
+/* We should clone test1 and test2 for constant 1000.
+ In the past we did not do this since we did not clone for edges that are not hot
+ and call main->test1 is not considered hot since it is executed just once. */
+/* { dg-final { scan-ipa-dump-times "Creating a specialized node of test1" 1 "cp"} } */
+/* { dg-final { scan-ipa-dump-times "Creating a specialized node of test2" 1 "cp"} } */
diff --git a/gcc/testsuite/gcc.dg/memcpy-4.c b/gcc/testsuite/gcc.dg/memcpy-4.c
index 4c726f0..b17b369 100644
--- a/gcc/testsuite/gcc.dg/memcpy-4.c
+++ b/gcc/testsuite/gcc.dg/memcpy-4.c
@@ -1,13 +1,8 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-rtl-expand" } */
+/* { dg-options "-O2" } */
-#ifdef __mips
-__attribute__((nomips16))
-#endif
void
f1 (char *p)
{
__builtin_memcpy (p, "12345", 5);
}
-
-/* { dg-final { scan-rtl-dump "mem/u.*mem/u" "expand" { target mips*-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/pr116357.c b/gcc/testsuite/gcc.dg/pr116357.c
index 07effa1..12aaf62 100644
--- a/gcc/testsuite/gcc.dg/pr116357.c
+++ b/gcc/testsuite/gcc.dg/pr116357.c
@@ -2,9 +2,9 @@
/* { dg-do compile } */
/* { dg-options "" } */
-typedef int A __attribute__((aligned (2 * alignof (int))));
+typedef int A __attribute__((aligned (2 * sizeof (int))));
A a[4]; /* { dg-error "alignment of array elements is greater than element size" } */
-typedef volatile int B __attribute__((aligned (2 * alignof (int))));
+typedef volatile int B __attribute__((aligned (2 * sizeof (int))));
B b[4]; /* { dg-error "alignment of array elements is greater than element size" } */
-typedef const int C __attribute__((aligned (2 * alignof (int))));
+typedef const int C __attribute__((aligned (2 * sizeof (int))));
C c[4]; /* { dg-error "alignment of array elements is greater than element size" } */
diff --git a/gcc/testsuite/gcc.dg/pr116479.c b/gcc/testsuite/gcc.dg/pr116479.c
new file mode 100644
index 0000000..dbbcb9a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr116479.c
@@ -0,0 +1,26 @@
+/* PR 116479 */
+/* { dg-do run { target { bitint } } } */
+/* { dg-additional-options "-O -funroll-loops -finline-stringops -fmodulo-sched --param=max-iterations-computation-cost=637924687 -std=c23" } */
+
+#if __BITINT_MAXWIDTH__ >= 13577
+_BitInt (13577) b;
+
+void
+foo (char *ret)
+{
+ __builtin_memset (&b, 4, 697);
+ *ret = 0;
+}
+#endif
+
+int
+main ()
+{
+#if __BITINT_MAXWIDTH__ >= 13577
+ char x;
+ foo (&x);
+ for (unsigned i = 0; i < sizeof (x); i++)
+ if (x != 0)
+ __builtin_abort ();
+#endif
+}
diff --git a/gcc/testsuite/gcc.dg/pr118947-1.c b/gcc/testsuite/gcc.dg/pr118947-1.c
new file mode 100644
index 0000000..8733e8d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr118947-1.c
@@ -0,0 +1,15 @@
+/* PR tree-optimization/118947 */
+/* { dg-do compile { target size32plus } } */
+/* { dg-options "-O2 -fdump-tree-forwprop1-details" } */
+/* { dg-final { scan-tree-dump-times "after previous" 1 "forwprop1" } } */
+
+void* aaa();
+void* bbb()
+{
+ char buf[1025] = {};
+ /* Tha call to aaa should not matter and clobber buf. */
+ void* ret = aaa();
+ __builtin_memcpy(ret, buf, sizeof(buf));
+ return ret;
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr78408-3.c b/gcc/testsuite/gcc.dg/pr78408-3.c
new file mode 100644
index 0000000..5ea5458
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr78408-3.c
@@ -0,0 +1,14 @@
+/* PR tree-optimization/78408 */
+/* { dg-do compile { target size32plus } } */
+/* { dg-options "-O2 -fdump-tree-forwprop1-details" } */
+/* { dg-final { scan-tree-dump-times "after previous" 1 "forwprop1" } } */
+
+void* aaa();
+void* bbb()
+{
+ void* ret = aaa();
+ char buf[1025] = {};
+ __builtin_memcpy(ret, buf, sizeof(buf));
+ return ret;
+}
+
diff --git a/gcc/testsuite/gcc.dg/raw-string-1.c b/gcc/testsuite/gcc.dg/raw-string-1.c
new file mode 100644
index 0000000..77d6145
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/raw-string-1.c
@@ -0,0 +1,25 @@
+/* PR c++/110343 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu23" } */
+
+const void *s0 = R"0123456789abcdefg()0123456789abcdefg" 0;
+ /* { dg-error "raw string delimiter longer" "longer" { target *-*-* } .-1 } */
+ /* { dg-error "stray" "stray" { target *-*-* } .-2 } */
+const void *s1 = R" () " 0;
+ /* { dg-error "invalid character" "invalid" { target *-*-* } .-1 } */
+ /* { dg-error "stray" "stray" { target *-*-* } .-2 } */
+const void *s2 = R" () " 0;
+ /* { dg-error "invalid character" "invalid" { target *-*-* } .-1 } */
+ /* { dg-error "stray" "stray" { target *-*-* } .-2 } */
+const void *s3 = R")())" 0;
+ /* { dg-error "invalid character" "invalid" { target *-*-* } .-1 } */
+ /* { dg-error "stray" "stray" { target *-*-* } .-2 } */
+const char *s4 = R"@()@";
+const char *s5 = R"$()$";
+const char *s6 = R"`()`";
+const void *s7 = R"\u0040()\u0040" 0;
+ /* { dg-error "invalid character" "invalid" { target *-*-* } .-1 } */
+ /* { dg-error "stray" "stray" { target *-*-* } .-2 } */
+const char *s8 = R"`@$$@`@`$()`@$$@`@`$";
+
+int main () {}
diff --git a/gcc/testsuite/gcc.dg/rtl/i386/vector_eq-2.c b/gcc/testsuite/gcc.dg/rtl/i386/vector_eq-2.c
new file mode 100644
index 0000000..871d489
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/rtl/i386/vector_eq-2.c
@@ -0,0 +1,71 @@
+/* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-additional-options "-O2 -march=x86-64-v3" } */
+
+typedef int v4si __attribute__((vector_size(16)));
+typedef int v8si __attribute__((vector_size(32)));
+typedef int v2di __attribute__((vector_size(16)));
+
+v4si __RTL (startwith ("vregs1")) foo1 (void)
+{
+(function "foo1"
+ (insn-chain
+ (block 2
+ (edge-from entry (flags "FALLTHRU"))
+ (cnote 1 [bb 2] NOTE_INSN_BASIC_BLOCK)
+ (cnote 2 NOTE_INSN_FUNCTION_BEG)
+ (cinsn 3 (set (reg:V4SI <0>) (const_vector:V4SI [(const_int -1) (const_int -1) (const_int -1) (const_int -1)])))
+ (cinsn 4 (set (reg:V4SI <1>) (const_vector:V4SI [(const_int -1) (const_int -1) (const_int -1) (const_int -1)])))
+ (cinsn 5 (set (reg:V4SI <2>)
+ (eq:V4SI (reg:V4SI <0>) (reg:V4SI <1>))))
+ (cinsn 6 (set (reg:V4SI <3>) (reg:V4SI <2>)))
+ (cinsn 7 (set (reg:V4SI xmm0) (reg:V4SI <3>)))
+ (edge-to exit (flags "FALLTHRU"))
+ )
+ )
+ (crtl (return_rtx (reg/i:V4SI xmm0)))
+)
+}
+
+v8si __RTL (startwith ("vregs1")) foo2 (void)
+{
+(function "foo2"
+ (insn-chain
+ (block 2
+ (edge-from entry (flags "FALLTHRU"))
+ (cnote 1 [bb 2] NOTE_INSN_BASIC_BLOCK)
+ (cnote 2 NOTE_INSN_FUNCTION_BEG)
+ (cinsn 3 (set (reg:V8SI <0>) (const_vector:V8SI [(const_int -1) (const_int -1) (const_int -1) (const_int -1) (const_int -1) (const_int -1) (const_int -1) (const_int -1)])))
+ (cinsn 4 (set (reg:V8SI <1>) (const_vector:V8SI [(const_int -1) (const_int -1) (const_int -1) (const_int -1) (const_int -1) (const_int -1) (const_int -1) (const_int -1)])))
+ (cinsn 5 (set (reg:V8SI <2>)
+ (eq:V8SI (reg:V8SI <0>) (reg:V8SI <1>))))
+ (cinsn 6 (set (reg:V8SI <3>) (reg:V8SI <2>)))
+ (cinsn 7 (set (reg:V8SI xmm0) (reg:V8SI <3>)))
+ (edge-to exit (flags "FALLTHRU"))
+ )
+ )
+ (crtl (return_rtx (reg/i:V8SI xmm0)))
+)
+}
+
+v2di __RTL (startwith ("vregs1")) foo3 (void)
+{
+(function "foo3"
+ (insn-chain
+ (block 2
+ (edge-from entry (flags "FALLTHRU"))
+ (cnote 1 [bb 2] NOTE_INSN_BASIC_BLOCK)
+ (cnote 2 NOTE_INSN_FUNCTION_BEG)
+ (cinsn 3 (set (reg:V2DI <0>) (const_vector:V2DI [(const_int -1) (const_int -1)])))
+ (cinsn 4 (set (reg:V2DI <1>) (const_vector:V2DI [(const_int -1) (const_int -1)])))
+ (cinsn 5 (set (reg:V2DI <2>)
+ (eq:V2DI (reg:V2DI <0>) (reg:V2DI <1>))))
+ (cinsn 6 (set (reg:V2DI <3>) (reg:V2DI <2>)))
+ (cinsn 7 (set (reg:V2DI xmm0) (reg:V2DI <3>)))
+ (edge-to exit (flags "FALLTHRU"))
+ )
+ )
+ (crtl (return_rtx (reg/i:V2DI xmm0)))
+)
+}
+
+/* { dg-final { scan-assembler-times "vpcmpeq" 3 } } */
diff --git a/gcc/testsuite/gcc.dg/rtl/i386/vector_eq-3.c b/gcc/testsuite/gcc.dg/rtl/i386/vector_eq-3.c
new file mode 100644
index 0000000..276c4c2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/rtl/i386/vector_eq-3.c
@@ -0,0 +1,74 @@
+/* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-additional-options "-O2 -march=x86-64-v3" } */
+
+typedef int v4si __attribute__((vector_size(16)));
+typedef int v8si __attribute__((vector_size(32)));
+typedef int v2di __attribute__((vector_size(16)));
+
+v4si __RTL (startwith ("vregs1")) foo1 (void)
+{
+(function "foo1"
+ (insn-chain
+ (block 2
+ (edge-from entry (flags "FALLTHRU"))
+ (cnote 1 [bb 2] NOTE_INSN_BASIC_BLOCK)
+ (cnote 2 NOTE_INSN_FUNCTION_BEG)
+ (cinsn 3 (set (reg:V4SI <1>)
+ (mem:V4SI (reg:SI di) [0 ptr S128 A128])))
+ (cinsn 4 (set (reg:V4SI <2>)
+ (eq:V4SI (reg:V4SI <1>)
+ (mem:V4SI (reg:SI di) [0 ptr S128 A128]))))
+ (cinsn 5 (set (reg:V4SI <3>) (reg:V4SI <2>)))
+ (cinsn 6 (set (reg:V4SI xmm0) (reg:V4SI <3>)))
+ (edge-to exit (flags "FALLTHRU"))
+ )
+ )
+ (crtl (return_rtx (reg/i:V4SI xmm0)))
+)
+}
+
+v8si __RTL (startwith ("vregs1")) foo2 (void)
+{
+(function "foo2"
+ (insn-chain
+ (block 2
+ (edge-from entry (flags "FALLTHRU"))
+ (cnote 1 [bb 2] NOTE_INSN_BASIC_BLOCK)
+ (cnote 2 NOTE_INSN_FUNCTION_BEG)
+ (cinsn 3 (set (reg:V8SI <1>)
+ (mem:V8SI (reg:SI di) [0 ptr S256 A256])))
+ (cinsn 4 (set (reg:V8SI <2>)
+ (eq:V8SI (mem:V8SI (reg:SI di) [0 ptr S256 A256])
+ (reg:V8SI <1>))))
+ (cinsn 5 (set (reg:V8SI <3>) (reg:V8SI <2>)))
+ (cinsn 6 (set (reg:V8SI xmm0) (reg:V8SI <3>)))
+ (edge-to exit (flags "FALLTHRU"))
+ )
+ )
+ (crtl (return_rtx (reg/i:V8SI xmm0)))
+)
+}
+
+v2di __RTL (startwith ("vregs1")) foo3 (void)
+{
+(function "foo3"
+ (insn-chain
+ (block 2
+ (edge-from entry (flags "FALLTHRU"))
+ (cnote 1 [bb 2] NOTE_INSN_BASIC_BLOCK)
+ (cnote 2 NOTE_INSN_FUNCTION_BEG)
+ (cinsn 3 (set (reg:V2DI <1>)
+ (mem:V2DI (reg:SI di) [0 ptr S128 A128])))
+ (cinsn 4 (set (reg:V2DI <2>)
+ (eq:V2DI (reg:V2DI <1>)
+ (mem:V2DI (reg:SI di) [0 ptr S128 A128]))))
+ (cinsn 5 (set (reg:V2DI <3>) (reg:V2DI <2>)))
+ (cinsn 6 (set (reg:V2DI xmm0) (reg:V2DI <3>)))
+ (edge-to exit (flags "FALLTHRU"))
+ )
+ )
+ (crtl (return_rtx (reg/i:V2DI xmm0)))
+)
+}
+
+/* { dg-final { scan-assembler-times "vpcmpeq" 3 } } */
diff --git a/gcc/testsuite/gcc.dg/tree-prof/ipa-cp-1.c b/gcc/testsuite/gcc.dg/tree-prof/ipa-cp-1.c
new file mode 100644
index 0000000..ab6a7f7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/ipa-cp-1.c
@@ -0,0 +1,30 @@
+/* { dg-options "-O2 -fdump-ipa-cp" } */
+__attribute__ ((used))
+int a[1000];
+
+__attribute__ ((noinline))
+void
+test2(int sz)
+{
+ for (int i = 0; i < sz; i++)
+ a[i]++;
+ asm volatile (""::"m"(a));
+}
+
+__attribute__ ((noinline))
+void
+test1 (int sz)
+{
+ for (int i = 0; i < 1000; i++)
+ test2(sz);
+}
+int main()
+{
+ test1(1000);
+ return 0;
+}
+/* We should clone test1 and test2 for constant 1000.
+ In the past we did not do this since we did not clone for edges that are not hot
+ and call main->test1 is not considered hot since it is executed just once. */
+/* { dg-final-use { scan-ipa-dump-times "Creating a specialized node of test1" 1 "cp"} } */
+/* { dg-final-use { scan-ipa-dump-times "Creating a specialized node of test2" 1 "cp"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr118902-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr118902-1.c
new file mode 100644
index 0000000..fa21b8a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr118902-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+void foo(int);
+void l(int**);
+int f1(int j, int t)
+{
+ int p = 0;
+ int *a = &p;
+ l(&a);
+ if (a == &p)
+ return 0;
+ for(int i = 0; i < j; i++)
+ {
+ if (a == &p) foo(p);
+ }
+ return 0;
+}
+
+/* We should be able to remove the call to foo because a is never equal to &p inside the loop. */
+/* { dg-final { scan-tree-dump-not "foo " "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c
index a879d30..6fa52f6 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-cse-2.c
@@ -27,4 +27,4 @@ foo ()
but the loop reads only one element at a time, and DOM cannot resolve these.
The same happens on powerpc depending on the SIMD support available. */
-/* { dg-final { scan-tree-dump "return 28;" "optimized" { xfail { { alpha*-*-* hppa*64*-*-* nvptx*-*-* mmix-knuth-mmixware } || { { { lp64 && { powerpc*-*-* sparc*-*-* riscv*-*-* } } || aarch64_sve } || { arm*-*-* && { ! arm_neon } } } } } } } */
+/* { dg-final { scan-tree-dump "return 28;" "optimized" { xfail { { alpha*-*-* hppa*64*-*-* nvptx*-*-* mmix-knuth-mmixware } || { { { lp64 && { mips*-*-* powerpc*-*-* sparc*-*-* riscv*-*-* } } || aarch64_sve } || { arm*-*-* && { ! arm_neon } } } } } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-52.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-52.c
new file mode 100644
index 0000000..9e605ac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-52.c
@@ -0,0 +1,30 @@
+/* { dg-options "-O2 -fdump-tree-dse-details -fno-tree-fre -fdump-tree-optimized" } */
+
+/* PR tree-optimization/87901 */
+
+char z[32];
+void foo1(void)
+{
+ char z1[17];
+ char z2[24];
+ __builtin_memset (z1, 0, 17);
+ __builtin_memcpy (z, z1, 17);
+ __builtin_memset (z2, 0, 24);
+ __builtin_memcpy (z+8, z2, 24);
+}
+
+/* we should get:
+ MEM <unsigned char[8]> [(char * {ref-all})&z] = {};
+ MEM <unsigned char[24]> [(char * {ref-all})&z + 8B] = {};
+ after DSE; trimming the first memset to z (which was memcpy) to 8 bytes
+ from the original 17.
+ and not have a [17] in the IR after DSE.
+ The two memset to z1/z2 will also be removed.
+ */
+/* { dg-final { scan-tree-dump-not "\\\[17\\\]" "optimized" } } */
+/* { dg-final { scan-tree-dump "\\\[8\\\]" "dse1" } } */
+
+/* { dg-final { scan-tree-dump-times "Trimming statement " 1 "dse1" } } */
+/* { dg-final { scan-tree-dump-times "Deleted dead call:" 2 "dse1" } } */
+
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-53.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-53.c
new file mode 100644
index 0000000..a2df591
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-53.c
@@ -0,0 +1,26 @@
+/* { dg-options "-O2 -fno-strict-aliasing -fdump-tree-dse-details -fno-tree-fre -fdump-tree-optimized" } */
+
+/* PR tree-optimization/87901 */
+
+
+int i;
+int foo ()
+{
+ i = 0;
+ *((short *)&i + 1) = 1;
+ return i;
+}
+
+/* we should get:
+ MEM <char[2]> [(int *)&i] = {};
+ MEM[(short int *)&i + 2B] = 1;
+ in DSE1.
+
+ Note later on the stores will be merged. */
+/* { dg-final { scan-tree-dump "return 65536;" "optimized" { target le } } } */
+/* { dg-final { scan-tree-dump "return 1;" "optimized" { target be } } } */
+/* { dg-final { scan-tree-dump "\\\[2\\\]" "dse1" } } */
+
+/* { dg-final { scan-tree-dump-times "Trimming statement " 1 "dse1" } } */
+
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-54.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-54.c
new file mode 100644
index 0000000..7e79a73
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-54.c
@@ -0,0 +1,25 @@
+/* { dg-options "-O2 -fdump-tree-dse-details -fno-tree-fre -fdump-tree-optimized" } */
+
+/* PR tree-optimization/87901 */
+
+int z[128];
+void foo1(void)
+{
+ int z1;
+ int z2[24/sizeof(int)];
+ __builtin_memset (&z1, 0, sizeof(int));
+ __builtin_memcpy (z, &z1, sizeof(int));
+ __builtin_memset (z2, 0, 24);
+ __builtin_memcpy (((char*)z)+1, z2, 24);
+}
+
+/* we should get:
+ MEM[(char * {ref-all})&z] = {};
+ __builtin_memset (&MEM <int[128]> [(void *)&z + 1B], 0, 24);
+ */
+
+/* { dg-final { scan-tree-dump-not "MEM <unsigned int>" "optimized" } } */
+/* { dg-final { scan-tree-dump-not "MEM \\\[" "dse1" } } */
+/* { dg-final { scan-tree-dump-times "Trimming statement " 1 "dse1" } } */
+/* { dg-final { scan-tree-dump-times "Deleted dead call:" 1 "dse1" } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_38.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_38.c
index 36fc6a6..010e7ea 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_38.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_38.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target vect_early_break } */
/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "-march=gfx908" { target amdgcn*-*-* } } */
#ifndef N
#define N 803