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