1 /* { dg-do compile } */
2 /* { dg-options "-O2 -march=r2 -mcdx" } */
3 
4 /* Check generation of R2 CDX mov.n and movi.n instructions.  */
5 
6 extern void f (int a, int b, int c, int d);
7 
g(int x,int y,int z)8 int g (int x, int y, int z)
9 {
10   f (100, x, y, z);
11   return -1;
12 }
13 
14 /* We should always get mov.n and never mov when compiling with -mcdx.  */
15 /* { dg-final { scan-assembler "\tmov\\.n\t.*" } } */
16 /* { dg-final { scan-assembler-not "\tmov\t.*" } } */
17 
18 /* Both of the constant loads are expressible with movi.n.  */
19 /* { dg-final { scan-assembler "\tmovi\\.n\t.*, 100" } } */
20 /* { dg-final { scan-assembler "\tmovi\\.n\t.*, -1" } } */
21