PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / arm / thumb-ifcvt.c
blob02e56f53b0d31b9e6ea1b1424f130ffe90d21e36
1 /* Check that Thumb 16-bit shifts can be if-converted. */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target arm_thumb2_ok } */
4 /* { dg-options "-O2 -mthumb -mno-restrict-it" } */
6 int
7 foo (int a, int b)
9 if (a != b)
11 a = a << b;
12 a = a >> 1;
15 return a + b;
18 /* { dg-final { scan-assembler "lslne" } } */
19 /* { dg-final { scan-assembler "asrne" } } */