1 /* Check -mflip-thumb. */
2 /* { dg-do compile } */
3 /* Make sure the current multilib supports thumb. */
4 /* { dg-skip-if "" { ! { arm_thumb1_ok || arm_thumb2_ok } } } */
5 /* { dg-skip-if "" arm_cortex_m } */
6 /* { dg-options "-O2 -mflip-thumb -mno-restrict-it" } */
7 /* { dg-final { scan-assembler "\\.arm" } } */
8 /* { dg-final { scan-assembler-times "\\.thumb_func" 1} } */
9
10 int
foo(int a)11 foo(int a)
12 {
13 return a ? 1 : 5;
14 }
15
16 int
bar(int a)17 bar(int a)
18 {
19 return a ? 1 : 5;
20 }
21
22 /* { dg-final { scan-assembler-times "ite" 1 { target { arm_thumb2_ok } } } } */
23
24
25
26
27
28