[AArch64] Split X-reg UBFX into W-reg LSR when possible
[official-gcc.git] / gcc / testsuite / gcc.target / aarch64 / ubfx_lsr_1.c
blobf6f72b074e1fc6bcb1976eee6c545e9781b4bed6
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
4 /* Check that an X-reg UBFX can be simplified into a W-reg LSR. */
6 int
7 f (unsigned long long x)
9 x = (x >> 24) & 255;
10 return x + 1;
13 /* { dg-final { scan-assembler "lsr\tw" } } */
14 /* { dg-final { scan-assembler-not "ubfx\tx" } } */