Adjust v850 rotate expander to allow more cases for V850E3V5
[official-gcc.git] / gcc / testsuite / gcc.target / cris / peep2-xsrand2.c
blob12f26dfb0fc02df8bb14a6f03d80ba74711addb0
1 /* { dg-do compile } */
2 /* { dg-final { scan-assembler "and.w -137," } } */
3 /* { dg-final { scan-assembler "and.b -62," } } */
4 /* { dg-final { scan-assembler "and.w -139," } } */
5 /* { dg-final { scan-assembler "and.b -63," } } */
6 /* { dg-final { scan-assembler-not "and.d " } } */
7 /* { dg-options "-O2" } */
9 /* PR target/17984. Test-case based on
10 testsuite/gcc.dg/cris-peep2-xsrand.c. */
12 unsigned int
13 andwlsr (unsigned int x)
15 return (x >> 16) & 0xff77;
18 unsigned int
19 andblsr (unsigned int x)
21 return (x >> 24) & 0xc2;
24 int
25 andwasr (int x)
27 return (x >> 16) & 0xff75;
30 int
31 andbasr (int x)
33 return (x >> 24) & 0xc1;