summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/arm/flip-thumb.c
blob: 4bbe546b6325b2cbc9f9b7f7c52c29815c231916 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* Check -mflip-thumb. */
/* { dg-do compile } */
/* Make sure the current multilib supports thumb.  */
/* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */
/* { dg-skip-if "" arm_cortex_m } */
/* { dg-options "-O2 -mflip-thumb -mno-restrict-it" } */
/* { dg-final { scan-assembler "\\.arm" } } */
/* { dg-final { scan-assembler-times "\\.thumb_func" 1} } */

int 
foo(int a)
{
  return a ? 1 : 5;
}

int 
bar(int a)
{
  return a ? 1 : 5;
}

/* { dg-final { scan-assembler-times "ite" 1 { target { arm_thumb2_ok } } } } */