1 /* { dg-do compile } */
2 /* { dg-options "-O2 -march=r2 -mcdx" } */
4 /* Check generation of R2 CDX and.n, andi.n, or.n, xor.n, and not.n
7 and.n, or.n, and x.n require one of the input registers to be the same
8 as the output register. Since the tests below want to put the result
9 in the return value register, they use this function to make sure that
10 one of the input operands is also already in the return register. */
12 extern unsigned int x (unsigned int a
);
14 unsigned int f (unsigned int a
, unsigned int b
)
19 unsigned int g (unsigned int a
)
24 unsigned int h (unsigned int a
, unsigned int b
)
29 unsigned int i (unsigned int a
, unsigned int b
)
34 unsigned int j (unsigned int a
)
39 /* { dg-final { scan-assembler "\tand\\.n\t.*" } } */
40 /* { dg-final { scan-assembler "\tandi\\.n\t.*, 31" } } */
41 /* { dg-final { scan-assembler "\tor\\.n\t.*" } } */
42 /* { dg-final { scan-assembler "\txor\\.n\t.*" } } */
43 /* { dg-final { scan-assembler "\tnot\\.n\t.*" } } */