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/Wbuiltin-declaration-mismatch-4.c4
-rw-r--r--gcc/testsuite/gcc.dg/bf-ms-attrib.c2
-rw-r--r--gcc/testsuite/gcc.dg/bitint-121.c24
-rw-r--r--gcc/testsuite/gcc.dg/bitint-122.c20
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-clone-4.c30
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-sra-19.c2
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr119318.c37
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr119530.c21
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr119803.c16
-rw-r--r--gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-2.c2
-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/pr118947-1.c15
-rw-r--r--gcc/testsuite/gcc.dg/pr119160.c26
-rw-r--r--gcc/testsuite/gcc.dg/pr119717.c24
-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/torture/bitint-76.c19
-rw-r--r--gcc/testsuite/gcc.dg/torture/bitint-77.c26
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr118476-1.c14
-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/pr119757.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-early-break_18.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-early-break_38.c1
32 files changed, 618 insertions, 17 deletions
diff --git a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-4.c b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-4.c
index c48fe5f..09aaaa6 100644
--- a/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-4.c
+++ b/gcc/testsuite/gcc.dg/Wbuiltin-declaration-mismatch-4.c
@@ -77,9 +77,9 @@ void test_integer_conversion_memset (void *d)
/* Passing a ptrdiff_t where size_t is expected may not be unsafe
but because GCC may emits suboptimal code for such calls warning
for them helps improve efficiency. */
- memset (d, 0, diffi); /* { dg-warning ".memset. argument 3 promotes to .ptrdiff_t. {aka .\(long \)?\(int\)?\(__int20\)?.} where .\(long \)?\(__int20 \)?unsigned\( int\)?. is expected" } */
+ memset (d, 0, diffi); /* { dg-warning ".memset. argument 3 promotes to .ptrdiff_t. {aka .\(long \)*\(int\)?\(__int20\)?.} where .\(long \)*\(__int20 \)?unsigned\( int\)?. is expected" } */
- memset (d, 0, 2.0); /* { dg-warning ".memset. argument 3 type is .double. where '\(long \)?\(__int20 \)?unsigned\( int\)?' is expected" } */
+ memset (d, 0, 2.0); /* { dg-warning ".memset. argument 3 type is .double. where '\(long \)*\(__int20 \)?unsigned\( int\)?' is expected" } */
/* Verify that the same call as above but to the built-in doesn't
trigger a warning. */
diff --git a/gcc/testsuite/gcc.dg/bf-ms-attrib.c b/gcc/testsuite/gcc.dg/bf-ms-attrib.c
index 2da4f03..5208c7f 100644
--- a/gcc/testsuite/gcc.dg/bf-ms-attrib.c
+++ b/gcc/testsuite/gcc.dg/bf-ms-attrib.c
@@ -32,7 +32,7 @@ main()
/* As long as the sizes are as expected, we know attributes are working.
bf-ms-layout.c makes sure the right thing happens when the attribute
is on. */
- if (sizeof(struct one_ms) != 8)
+ if (sizeof(struct one_ms) != 12)
abort();
if (sizeof(struct one_gcc) != 8)
abort();
diff --git a/gcc/testsuite/gcc.dg/bitint-121.c b/gcc/testsuite/gcc.dg/bitint-121.c
new file mode 100644
index 0000000..335b9a1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bitint-121.c
@@ -0,0 +1,24 @@
+/* PR middle-end/119808 */
+/* { dg-do run { target { bitint && fstack_protector } } } */
+/* { dg-options "-O0 -ftree-coalesce-vars -fstack-protector-strong" } */
+
+#if __BITINT_MAXWIDTH__ >= 129
+_BitInt(129)
+foo ()
+{
+ _BitInt(129) b = 0;
+ _BitInt(8) a
+ =__builtin_stdc_rotate_right (0x8c82111b5d2d37c57e9ada7213ed95a49uwb, b);
+ return b;
+}
+#endif
+
+int
+main ()
+{
+#if __BITINT_MAXWIDTH__ >= 129
+ _BitInt(129) x = foo ();
+ if (x)
+ __builtin_abort ();
+#endif
+}
diff --git a/gcc/testsuite/gcc.dg/bitint-122.c b/gcc/testsuite/gcc.dg/bitint-122.c
new file mode 100644
index 0000000..c791969
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/bitint-122.c
@@ -0,0 +1,20 @@
+/* PR tree-optimization/116093 */
+/* { dg-do run { target bitint } } */
+/* { dg-options "-Og -ftree-vrp -fno-tree-dce" } */
+
+#if __BITINT_MAXWIDTH__ >= 129
+char
+foo (int a, _BitInt (129) b, char c)
+{
+ return c << (5 / b % (0xdb75dbf5 | a));
+}
+#endif
+
+int
+main ()
+{
+#if __BITINT_MAXWIDTH__ >= 129
+ if (foo (0, 6, 1) != 1)
+ __builtin_abort ();
+#endif
+}
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/ipa/ipa-sra-19.c b/gcc/testsuite/gcc.dg/ipa/ipa-sra-19.c
index c34c89e..39874ad 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-sra-19.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-sra-19.c
@@ -1,7 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-additional-options "-msse2" { target ia32 } } */
-/* { dg-additional-options "-Wno-psabi" { target powerpc-ibm-aix* powerpc-wrs-vxworks* } } */
+/* { dg-additional-options "-Wno-psabi" { target powerpc-ibm-aix* powerpc-wrs-vxworks* powerpc-*-elf } } */
typedef int __attribute__((__vector_size__(16))) vectype;
diff --git a/gcc/testsuite/gcc.dg/ipa/pr119318.c b/gcc/testsuite/gcc.dg/ipa/pr119318.c
new file mode 100644
index 0000000..f179aed
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr119318.c
@@ -0,0 +1,37 @@
+/* { dg-do run } */
+/* { dg-require-effective-target int128 } */
+/* { dg-options "-Wno-psabi -w -O2" } */
+
+typedef unsigned V __attribute__((vector_size (64)));
+typedef unsigned __int128 W __attribute__((vector_size (64)));
+
+W a;
+W b;
+W c = { -0xffff, -0xffff, -0xffff, -0xffff };
+
+static __attribute__((__noinline__, __noclone__)) W
+bar (unsigned __int128 u)
+{
+ return u + c;
+}
+
+static inline W
+foo (unsigned short s, V v)
+{
+ V y = (V) bar ((unsigned short) ~s);
+ v >>= y;
+ b ^= (W) a;
+ v *= v;
+ return (W) v + b;
+}
+
+
+int
+main ()
+{
+ W x = foo (0, (V) { 0, 5 });
+ for (unsigned i = 0; i < sizeof(x)/sizeof(x[0]); i++)
+ if (x[i] != (i ? 0 : 0x1900000000))
+ __builtin_abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/pr119530.c b/gcc/testsuite/gcc.dg/ipa/pr119530.c
new file mode 100644
index 0000000..f99c4fd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr119530.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fno-tree-vrp -fno-inline" } */
+
+struct a {
+ int b;
+};
+int c;
+signed char d;
+static int e(long long f) { return f < 0; }
+static void g(unsigned f) { c = e(~f); }
+int main() {
+ int h;
+ struct a i = {128};
+ h = d > i.b;
+ g(h);
+ if (h)
+ __builtin_abort();
+ if (c)
+ __builtin_abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/pr119803.c b/gcc/testsuite/gcc.dg/ipa/pr119803.c
new file mode 100644
index 0000000..1a7bfd2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr119803.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+extern void f(int p);
+int a, b;
+char c;
+static int d(int e) { return !e || a == 1 ? 0 : a / e; }
+static void h(short e) {
+ int g = d(e);
+ f(g);
+}
+void i() {
+ c = 128;
+ h(c);
+ b = d(65536);
+}
diff --git a/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c b/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c
index 8c15097..2be31fa 100644
--- a/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c
+++ b/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c
@@ -25,5 +25,5 @@ bar (long a)
}
/* { dg-final { scan-rtl-dump "Will split live ranges of parameters" "ira" } } */
-/* { dg-final { scan-rtl-dump "Split live-range of register" "ira" { xfail { ! aarch64*-*-* } } } } */
+/* { dg-final { scan-rtl-dump "Split live-range of register" "ira" { xfail { ! { aarch64*-*-* i?86-*-* x86_64-*-* } } } } } */
/* { dg-final { scan-rtl-dump "Performing shrink-wrapping" "pro_and_epilogue" } } */
diff --git a/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-2.c b/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-2.c
index 0690e03..61ee4c6 100644
--- a/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-2.c
+++ b/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-2.c
@@ -30,6 +30,6 @@ bar (long a)
}
/* { dg-final { scan-rtl-dump "Will split live ranges of parameters" "ira" } } */
-/* { dg-final { scan-rtl-dump "Split live-range of register" "ira" { xfail { ! aarch64*-*-* } } } } */
+/* { dg-final { scan-rtl-dump "Split live-range of register" "ira" { xfail { ! { aarch64*-*-* i?86-*-* x86_64-*-* } } } } } */
/* XFAIL due to PR70681. */
/* { dg-final { scan-rtl-dump "Performing shrink-wrapping" "pro_and_epilogue" { xfail arm*-*-* powerpc*-*-* } } } */
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/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/pr119160.c b/gcc/testsuite/gcc.dg/pr119160.c
new file mode 100644
index 0000000..b4629a1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr119160.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -finstrument-functions-once -favoid-store-forwarding -fnon-call-exceptions -fschedule-insns -mgeneral-regs-only -Wno-psabi" } */
+
+typedef __attribute__((__vector_size__ (32))) int V;
+
+void
+foo (V v, V, V, V *r)
+{
+ V u = (V){} + v[0];
+ *r = u;
+}
+
+__attribute__((__noipa__)) void
+bar(int x)
+{
+ if (x != 2) __builtin_abort();
+}
+
+int
+main ()
+{
+ V x;
+ foo ((V){ 2, 3 }, (V){ }, (V){ }, &x);
+ for (unsigned i = 0; i < sizeof(x)/sizeof(x[0]); i++)
+ bar(x[i]);
+} \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/pr119717.c b/gcc/testsuite/gcc.dg/pr119717.c
new file mode 100644
index 0000000..e5eedc5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr119717.c
@@ -0,0 +1,24 @@
+/* PR c/119717 */
+/* { dg-additional-options "-std=c23" } */
+/* { dg-do compile } */
+
+struct annotated {
+ unsigned count;
+ [[gnu::counted_by(count)]] char array[];
+};
+
+[[gnu::noinline,gnu::noipa]]
+static unsigned
+size_of (bool x, struct annotated *a)
+{
+ char *p = (x ? a : 0)->array;
+ return __builtin_dynamic_object_size (p, 1);
+}
+
+int main()
+{
+ struct annotated *p = __builtin_malloc(sizeof *p);
+ p->count = 0;
+ __builtin_printf ("the bdos whole is %ld\n", size_of (0, p));
+ return 0;
+}
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/torture/bitint-76.c b/gcc/testsuite/gcc.dg/torture/bitint-76.c
new file mode 100644
index 0000000..df47857
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/bitint-76.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/119707 */
+/* { dg-do run { target bitint } } */
+
+#if __BITINT_MAXWIDTH__ >= 256
+__attribute__((noipa)) unsigned _BitInt(256)
+foo (unsigned _BitInt(256) x, _BitInt(129) y)
+{
+ return x + (unsigned _BitInt(255)) y;
+}
+#endif
+
+int
+main ()
+{
+#if __BITINT_MAXWIDTH__ >= 256
+ if (foo (0, -1) != 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffuwb)
+ __builtin_abort ();
+#endif
+}
diff --git a/gcc/testsuite/gcc.dg/torture/bitint-77.c b/gcc/testsuite/gcc.dg/torture/bitint-77.c
new file mode 100644
index 0000000..3e2523f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/bitint-77.c
@@ -0,0 +1,26 @@
+/* PR tree-optimization/119722 */
+/* { dg-do run { target bitint } } */
+/* { dg-options "-O2 -fno-tree-forwprop -fno-tree-copy-prop -fno-tree-fre" } */
+
+#if __BITINT_MAXWIDTH__ >= 33300
+unsigned _BitInt(33300) g;
+
+unsigned
+foo (long c)
+{
+ unsigned _BitInt(33300) b
+ = __builtin_stdc_rotate_left ((unsigned _BitInt(13)) 8, c);
+ return ((unsigned _BitInt(50)) (g >> 50)
+ + ({ unsigned _BitInt(300) unused; b; }));
+}
+#endif
+
+int
+main ()
+{
+#if __BITINT_MAXWIDTH__ >= 33300
+ unsigned x = foo (0);
+ if (x != 8)
+ __builtin_abort ();
+#endif
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr118476-1.c b/gcc/testsuite/gcc.dg/torture/pr118476-1.c
new file mode 100644
index 0000000..33509403
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr118476-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+/* PR tree-optimization/118476 */
+
+typedef unsigned long long poly64x1 __attribute__((__vector_size__(1*sizeof(long long))));
+
+poly64x1 vext_p64(poly64x1 a, poly64x1 b, const int n)
+{
+ poly64x1 r = a;
+ unsigned src = (unsigned)n;
+ long long t = b[0];
+ r[0] = (src < 1) ? a[src] : t;
+ return r;
+}
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/pr119757.c b/gcc/testsuite/gcc.dg/vect/pr119757.c
new file mode 100644
index 0000000..8644299
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr119757.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+void base64_encode(const char *table64,
+ const char *inputbuff, int insize,
+ char * __restrict output)
+{
+ const unsigned char *in = (const unsigned char *)inputbuff;
+
+ while(insize >= 3) {
+ *output++ = table64[ in[0] >> 2 ];
+ *output++ = table64[ ((in[0] & 0x03) << 4) | (in[1] >> 4) ];
+ *output++ = table64[ ((in[1] & 0x0F) << 2) | ((in[2] & 0xC0) >> 6) ];
+ *output++ = table64[ in[2] & 0x3F ];
+ insize -= 3;
+ in += 3;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c b/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c
index edddb44..cd39704 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-early-break_18.c
@@ -2,7 +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*-*-* } } */
/* { dg-additional-options "-Ofast" } */
/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_load_lanes } } } */
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