ccmp_2.c: New test.
authorSteve Ellcey <sellcey@cavium.com>
Thu, 29 Jun 2017 18:23:40 +0000 (18:23 +0000)
committerSteve Ellcey <sje@gcc.gnu.org>
Thu, 29 Jun 2017 18:23:40 +0000 (18:23 +0000)
2017-06-29  Steve Ellcey  <sellcey@cavium.com>

* gcc.target/aarch64/ccmp_2.c: New test.

From-SVN: r249806

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/aarch64/ccmp_2.c [new file with mode: 0644]

index d44f1a14862ad04eaef52f8176f521902ffaa554..8aba9c2fd41d1fb7d748b62458c3c0f2a07abdab 100644 (file)
@@ -1,3 +1,7 @@
+2017-06-29  Steve Ellcey  <sellcey@cavium.com>
+
+       * gcc.target/aarch64/ccmp_2.c: New test.
+
 2017-06-29  Nathan Sidwell  <nathan@acm.org>
 
        PR c++/81247
diff --git a/gcc/testsuite/gcc.target/aarch64/ccmp_2.c b/gcc/testsuite/gcc.target/aarch64/ccmp_2.c
new file mode 100644 (file)
index 0000000..77ab020
--- /dev/null
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int g(void);
+int h(int a, _Bool c)
+{
+  if (a != 0 && c)
+    return g();
+  return 1;
+}
+
+/* { dg-final { scan-assembler "\tccmp\t" } } */