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" } */ 5 6 int foo(int a,int b)7foo (int a, int b) 8 { 9 if (a != b) 10 { 11 a = a << b; 12 a = a >> 1; 13 } 14 15 return a + b; 16 } 17 18 /* { dg-final { scan-assembler "lslne" } } */ 19 /* { dg-final { scan-assembler "asrne" } } */ 20