OSDN Git Service

* gcc.dg/vect/vect-116.c: Add vect_int target requirement.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / cris-peep2-xsrand2.c
1 /* { dg-do compile { target cris-*-* } } */
2 /* { dg-final { scan-assembler "and.w -137," } } */
3 /* { dg-final { scan-assembler "and.b -64," } } */
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" } */
8
9 /* PR target/17984.  Test-case based on
10    testsuite/gcc.dg/cris-peep2-xsrand.c.  */
11
12 unsigned int
13 andwlsr (unsigned int x)
14 {
15   return (x >> 16) & 0xff77;
16 }
17
18 unsigned int
19 andblsr (unsigned int x)
20 {
21   return (x >> 24) & 0xc0;
22 }
23
24 int
25 andwasr (int x)
26 {
27   return (x >> 16) & 0xff75;
28 }
29
30 int
31 andbasr (int x)
32 {
33   return (x >> 24) & 0xc1;
34 }