aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/20050603-3.c
blob: 4017d34f429ab61bc6cbfee6330118aee3b8fa13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* { dg-do compile } */
/* { dg-options "-O2" } */
struct Q
{
  long x:20;
  long y:4;
  long z:8;
}b;
/* This should generate a single rl[wd]imi. */
void rotins (unsigned int x)
{
  b.y = (x<<12) | (x>>20);
}

/* { dg-final { scan-assembler-not {\mrlwinm} } } */
/* { dg-final { scan-assembler-not {\mrldic} } } */
/* { dg-final { scan-assembler-not {\mrot[lr]} } } */
/* { dg-final { scan-assembler-not {\ms[lr][wd]} } } */
/* { dg-final { scan-assembler-times {\mrl[wd]imi} 1 } } */