This commit was manufactured by cvs2svn to create branch
[official-gcc.git] / gcc / testsuite / gcc.dg / cris-peep2-andu2.c
blob4f687cc081c347bdef73f0ced7a383e3c8d9fb2f
1 /* { dg-do compile { target cris-*-* } } */
2 /* { dg-final { scan-assembler "movu.w \\\$r10,\\\$r" } } */
3 /* { dg-final { scan-assembler "and.w 2047,\\\$r" } } */
4 /* { dg-final { scan-assembler-not "move.d \\\$r10,\\\$r" } } */
5 /* { dg-final { scan-assembler "movu.b \\\$r10,\\\$r" } } */
6 /* { dg-final { scan-assembler "and.b 95,\\\$r" } } */
7 /* { dg-final { scan-assembler "andq -2,\\\$r" } } */
8 /* { dg-options "-O2" } */
10 /* Test the "andu" peephole2 trivially, register operand. */
12 unsigned int
13 and_peep2_hi (unsigned int y, unsigned int *x)
15 *x = y & 0x7ff;
16 return y;
19 unsigned int
20 and_peep2_qi (unsigned int y, unsigned int *x)
22 *x = y & 0x5f;
23 return y;
27 unsigned int
28 and_peep2_q (unsigned int y, unsigned int *x)
30 *x = y & 0xfe;
31 return y;