diff options
author | Ian Lance Taylor <iant@golang.org> | 2020-12-07 10:45:52 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2020-12-07 10:45:52 -0800 |
commit | 45c32be1f96ace25b66c34a84818dc5e07e9d516 (patch) | |
tree | 2a6658e3df17c11dd8d74d9c7403c9bc69678010 /gcc/testsuite/gcc.dg | |
parent | 945ae3ab27757d3261d99446f96105c5ebe70247 (diff) | |
parent | b737b70fad398728f6006e8397d1bb31ccea4ce7 (diff) | |
download | gcc-45c32be1f96ace25b66c34a84818dc5e07e9d516.zip gcc-45c32be1f96ace25b66c34a84818dc5e07e9d516.tar.gz gcc-45c32be1f96ace25b66c34a84818dc5e07e9d516.tar.bz2 |
Merge from trunk revision b737b70fad398728f6006e8397d1bb31ccea4ce7.
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/loop-8.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr98147.c | 10 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/pr98117.c | 19 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr88676-2.c | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr96232-1.c | 11 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/tree-ssa/pr96232-2.c | 18 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/bb-slp-70.c | 17 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/vect/bb-slp-pr98137.c | 27 |
8 files changed, 105 insertions, 3 deletions
diff --git a/gcc/testsuite/gcc.dg/loop-8.c b/gcc/testsuite/gcc.dg/loop-8.c index af317d8..90ea1c4 100644 --- a/gcc/testsuite/gcc.dg/loop-8.c +++ b/gcc/testsuite/gcc.dg/loop-8.c @@ -1,6 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O1 -fdump-rtl-loop2_invariant" } */ -/* { dg-skip-if "unexpected IV" { "hppa*-*-* mips*-*-* visium-*-* powerpc*-*-* riscv*-*-* mmix-*-*" } } */ +/* { dg-skip-if "unexpected IV" { "hppa*-*-* mips*-*-* visium-*-* powerpc*-*-* riscv*-*-* mmix-*-* vax-*-*" } } */ /* Load immediate on condition is available from z13 on and prevents moving the load out of the loop, so always run this test with -march=zEC12 that does not have load immediate on condition. */ diff --git a/gcc/testsuite/gcc.dg/pr98147.c b/gcc/testsuite/gcc.dg/pr98147.c new file mode 100644 index 0000000..3edc798 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr98147.c @@ -0,0 +1,10 @@ +/* PR target/98147 */ + +char buffer[32] = "foo bar"; + +int +main () +{ + __builtin___clear_cache (buffer, buffer + 32); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/torture/pr98117.c b/gcc/testsuite/gcc.dg/torture/pr98117.c new file mode 100644 index 0000000..f216025 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr98117.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-additional-options "-fno-tree-scev-cprop" } */ + +unsigned char c; +void __attribute__((noipa)) +e() +{ + do + { + } + while (++c); +} +int main() +{ + e(); + if (c != 0) + __builtin_abort (); + return 0; +} diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr88676-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr88676-2.c index 0e61636..ea88407 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr88676-2.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr88676-2.c @@ -1,7 +1,7 @@ /* PR tree-optimization/88676 */ /* { dg-do compile } */ -/* { dg-options "-O2 -fdump-tree-phiopt1" } */ -/* { dg-final { scan-tree-dump-not " = PHI <" "phiopt1" { target le } } } */ +/* { dg-options "-O2 -fdump-tree-phiopt2" } */ +/* { dg-final { scan-tree-dump-not " = PHI <" "phiopt2" { target le } } } */ struct foo1 { int i:1; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr96232-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr96232-1.c new file mode 100644 index 0000000..3170ffd --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr96232-1.c @@ -0,0 +1,11 @@ +/* PR tree-optimization/96232 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ +/* { dg-final { scan-tree-dump " \\+ -1;" "optimized" } } */ +/* { dg-final { scan-tree-dump-not "~x_\[0-9]*\\\(D\\\)" "optimized" } } */ + +int +foo (_Bool x) +{ + return x ? 0 : -1; +} diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr96232-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr96232-2.c new file mode 100644 index 0000000..9f51820 --- /dev/null +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr96232-2.c @@ -0,0 +1,18 @@ +/* PR tree-optimization/96232 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fdump-tree-optimized" } */ +/* { dg-final { scan-tree-dump " 38 - " "optimized" } } */ +/* { dg-final { scan-tree-dump " \\+ 97;" "optimized" } } */ +/* { dg-final { scan-tree-dump-not "PHI <" "optimized" } } */ + +int +foo (_Bool x) +{ + return x ? 37 : 38; +} + +int +bar (_Bool x) +{ + return x ? 98 : 97; +} diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-70.c b/gcc/testsuite/gcc.dg/vect/bb-slp-70.c new file mode 100644 index 0000000..0eb7011 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-70.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-mavx512vl -mavx512vpopcntdq" { target avx512vpopcntdq } } */ + +typedef unsigned uv4si __attribute__((vector_size(16))); + +uv4si __attribute__((noinline)) +vpopctf (uv4si a) +{ + uv4si r; + r[2] = __builtin_popcount (a[2]); + r[1] = __builtin_popcount (a[1]); + r[0] = __builtin_popcount (a[0]); + r[3] = __builtin_popcount (a[3]); + return r; +} + +/* { dg-final { scan-tree-dump "optimized: basic block" "slp2" { target avx512vpopcntdq } } } */ diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pr98137.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pr98137.c new file mode 100644 index 0000000..ecf7df2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pr98137.c @@ -0,0 +1,27 @@ +/* { dg-do compile } */ +/* { dg-additional-options "-O3" } */ +/* { dg-require-effective-target vect_double } */ + +void +gemm (const double* __restrict__ A, const double* __restrict__ B, + double* __restrict__ C) +{ + unsigned int l_m = 0; + unsigned int l_n = 0; + unsigned int l_k = 0; + + for ( l_n = 0; l_n < 9; l_n++ ) { + /* Use -O3 so this loop is unrolled completely early. */ + for ( l_m = 0; l_m < 10; l_m++ ) { C[(l_n*10)+l_m] = 0.0; } + for ( l_k = 0; l_k < 17; l_k++ ) { + /* Use -O3 so this loop is unrolled completely early. */ + for ( l_m = 0; l_m < 10; l_m++ ) { + C[(l_n*10)+l_m] += A[(l_k*20)+l_m] * B[(l_n*20)+l_k]; + } + } + } +} + +/* Exact scanning is difficult but we expect all loads and stores + and computations to be vectorized. */ +/* { dg-final { scan-tree-dump "optimized: basic block" "slp1" } } */ |