aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/unsigned-extend-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/arm/unsigned-extend-2.c')
-rw-r--r--gcc/testsuite/gcc.target/arm/unsigned-extend-2.c28
1 files changed, 22 insertions, 6 deletions
diff --git a/gcc/testsuite/gcc.target/arm/unsigned-extend-2.c b/gcc/testsuite/gcc.target/arm/unsigned-extend-2.c
index 41ee994..8a1a293 100644
--- a/gcc/testsuite/gcc.target/arm/unsigned-extend-2.c
+++ b/gcc/testsuite/gcc.target/arm/unsigned-extend-2.c
@@ -1,6 +1,26 @@
/* { dg-do compile } */
-/* { dg-require-effective-target arm_thumb2_ok_no_arm_v8_1m_lob } */
-/* { dg-options "-O" } */
+/* { dg-require-effective-target arm_thumb2_ok } */
+/* { dg-options "-O2 -mthumb -fno-schedule-insns -fno-schedule-insns2" } */
+/* { dg-final { check-function-bodies "**" "" } } */
+
+/*
+** foo:
+** (
+** movs (r[0-9]+), #8
+** and r0, r1, r0, lsr #1
+** subs \1, \1, #1
+** ands \1, \1, #255
+** bne .L[0-9]+
+** bx lr
+** |
+** push {lr}
+** movs (r[0-9]+), #8
+** dls lr, \2
+** and r0, r1, r0, lsr #1
+** le lr, .L[0-9]+
+** pop {pc}
+** )
+*/
unsigned short foo (unsigned short x, unsigned short c)
{
@@ -12,7 +32,3 @@ unsigned short foo (unsigned short x, unsigned short c)
}
return x;
}
-
-/* { dg-final { scan-assembler "ands" } } */
-/* { dg-final { scan-assembler-not "uxtb" } } */
-/* { dg-final { scan-assembler-not "cmp" } } */