aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@gcc.gnu.org>2016-10-11 08:55:31 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2016-10-11 08:55:31 +0000
commitd2d58b10b972c309052eaf5f8eacd9fde9c818f7 (patch)
tree44f40edba933374fc203f336c211a0d6fad87bba /gcc
parentff7e7ee099988c5dea7973553983bb23db7c2924 (diff)
downloadgcc-d2d58b10b972c309052eaf5f8eacd9fde9c818f7.zip
gcc-d2d58b10b972c309052eaf5f8eacd9fde9c818f7.tar.gz
gcc-d2d58b10b972c309052eaf5f8eacd9fde9c818f7.tar.bz2
Add missing file
From-SVN: r240972
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/gcc.target/sparc/setcc-10.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/sparc/setcc-10.c b/gcc/testsuite/gcc.target/sparc/setcc-10.c
new file mode 100644
index 0000000..7d75e48
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sparc/setcc-10.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O1 -msubxc" } */
+
+long foo2 (long a, long i)
+{
+ return a - (i != 0);
+}
+
+long foo4 (long a, long b, long i)
+{
+ return a - b - (i != 0);
+}
+
+long foo5 (long a, long i)
+{
+ return a + (i == 0);
+}
+
+/* { dg-final { scan-assembler-times "subxc\t%" 3 } } */
+/* { dg-final { scan-assembler-times "cmp\t%" 3 } } */
+/* { dg-final { scan-assembler-not "add\t%" } } */
+/* { dg-final { scan-assembler-not "sub\t%" } } */