diff options
author | Ian Lance Taylor <iant@golang.org> | 2021-02-03 08:48:19 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2021-02-03 08:48:19 -0800 |
commit | 305e9d2c7815e90a29bbde1e3a7cd776861f4d7c (patch) | |
tree | 32dedad81f42b67729aef302069fcee11132d215 /gcc/testsuite/gcc.dg | |
parent | 8910f1cd79445bbe2da01f8ccf7c37909349529e (diff) | |
parent | 530203d6e3244c25eda4124f0fa5756ca9a5683e (diff) | |
download | gcc-305e9d2c7815e90a29bbde1e3a7cd776861f4d7c.zip gcc-305e9d2c7815e90a29bbde1e3a7cd776861f4d7c.tar.gz gcc-305e9d2c7815e90a29bbde1e3a7cd776861f4d7c.tar.bz2 |
Merge from trunk revision 530203d6e3244c25eda4124f0fa5756ca9a5683e.
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr97487-1.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr97487-2.c | 18 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pr98287.c | 19 |
3 files changed, 46 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr97487-1.c b/gcc/testsuite/gcc.dg/pr97487-1.c new file mode 100644 index 0000000..e79d1f1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr97487-1.c @@ -0,0 +1,9 @@ +/* PR middle-end/97487 */ +/* { dg-do compile } */ +/* { dg-options "-O2 --param max-rtl-if-conversion-unpredictable-cost=0" } */ + +long int __attribute__ ((simd)) +foo (long int x, long int y) +{ + return x < 0 ? y : 0; +} diff --git a/gcc/testsuite/gcc.dg/pr97487-2.c b/gcc/testsuite/gcc.dg/pr97487-2.c new file mode 100644 index 0000000..0b62381 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr97487-2.c @@ -0,0 +1,18 @@ +/* PR middle-end/97487 */ +/* { dg-do compile } */ +/* { dg-options "-O2 --param max-rtl-if-conversion-unpredictable-cost=0 -Wno-psabi -w" } */ + +typedef long long int V __attribute__((vector_size (16))); + +long long int +foo (V x, V y) +{ + long long int t1 = y[0]; + long long int t2 = x[0]; + long long int t3; + if (t2 < 0) + t3 = t1; + else + t3 = 0; + return t3; +} diff --git a/gcc/testsuite/gcc.dg/pr98287.c b/gcc/testsuite/gcc.dg/pr98287.c new file mode 100644 index 0000000..0314428 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr98287.c @@ -0,0 +1,19 @@ +/* PR tree-optimization/98287 */ +/* { dg-do compile } */ +/* { dg-options "-O2 -fno-tree-ccp -fno-tree-forwprop -Wno-psabi -w" } */ + +typedef unsigned long __attribute__((__vector_size__ (8))) V; +V v; + +static __attribute__((noinline, noclone)) V +bar (unsigned short s) +{ + return v >> s << s | v >> s >> 63; +} + +unsigned long +foo (void) +{ + V x = bar (1); + return x[0]; +} |