re PR target/43920 (Choosing conditional execution over conditional branches for...
authorTom de Vries <tom@codesourcery.com>
Tue, 5 Apr 2011 13:01:50 +0000 (13:01 +0000)
committerTom de Vries <vries@gcc.gnu.org>
Tue, 5 Apr 2011 13:01:50 +0000 (13:01 +0000)
2011-04-05  Tom de Vries  <tom@codesourcery.com>

PR target/43920
* gcc.target/arm/pr43920-1.c: New test.

From-SVN: r171986

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/arm/pr43920-1.c [new file with mode: 0644]

index 84e7d7ef6e200a25ff00652fe3ef41bb78b1c442..f60beeafec7dbec1e172493d0eec253cf294a08d 100644 (file)
@@ -1,3 +1,8 @@
+2011-04-05  Tom de Vries  <tom@codesourcery.com>
+
+       PR target/43920
+       * gcc.target/arm/pr43920-1.c: New test.
+
 2011-04-04  Yufeng Zhang  <yufeng.zhang@arm.com>
 
         * g++.dg/abi/arm_cxa_vec1.C (__ARM_EABI__): Fix typo.
diff --git a/gcc/testsuite/gcc.target/arm/pr43920-1.c b/gcc/testsuite/gcc.target/arm/pr43920-1.c
new file mode 100644 (file)
index 0000000..38e254c
--- /dev/null
@@ -0,0 +1,42 @@
+/* { dg-do compile } */
+/* { dg-options "-mthumb -Os" }  */
+/* { dg-require-effective-target arm_thumb2_ok } */
+
+int
+f (int start, int end, int *start_)
+{
+  if (start == -1 || end == -1)
+    return -1;
+
+  if (end - start)
+    return -1;
+
+  *start_ = start;
+
+  return 0;
+}
+
+/* { dg-final { scan-assembler-times "\torr" 0 } } */
+/* { dg-final { scan-assembler-times "\tit\t" 0 } } */
+/* { dg-final { scan-assembler "\tbeq" } } */
+/* { dg-do compile } */
+/* { dg-options "-mthumb -Os" }  */
+/* { dg-require-effective-target arm_thumb2_ok } */
+
+int
+f (int start, int end, int *start_)
+{
+  if (start == -1 || end == -1)
+    return -1;
+
+  if (end - start)
+    return -1;
+
+  *start_ = start;
+
+  return 0;
+}
+
+/* { dg-final { scan-assembler-times "\torr" 0 } } */
+/* { dg-final { scan-assembler-times "\tit\t" 0 } } */
+/* { dg-final { scan-assembler "\tbeq" } } */