[PR43920,2/9] ARM specific part - test case

Submitted by Tom de Vries on March 31, 2011, 6:27 p.m.

Details

Message ID 4D94C787.4060207@codesourcery.com
State New
Headers show

Commit Message

Tom de Vries March 31, 2011, 6:27 p.m.
A testcase for the code in arm-size-branch_cost.patch.

Thanks,
- Tom

Patch hide | download patch | download mbox

Index: gcc/testsuite/gcc.target/arm/pr43920-1.c
===================================================================
--- gcc/testsuite/gcc.target/arm/pr43920-1.c	(revision 0)
+++ gcc/testsuite/gcc.target/arm/pr43920-1.c	(revision 0)
@@ -0,0 +1,20 @@ 
+/* { dg-do compile } */
+/* { dg-options "-march=armv7-a -mthumb -Os" } */
+
+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" } } */