summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/aarch64/ubfx_lsr_1.c
blob: f6f72b074e1fc6bcb1976eee6c545e9781b4bed6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* { dg-do compile } */
/* { dg-options "-O2" } */

/* Check that an X-reg UBFX can be simplified into a W-reg LSR.  */

int
f (unsigned long long x)
{
  x = (x >> 24) & 255;
  return x + 1;
}

/* { dg-final { scan-assembler "lsr\tw" } } */
/* { dg-final { scan-assembler-not "ubfx\tx" } } */