1 /* Tests to check the utilization of the addc and subc instructions.
2 If everything works as expected we won't see any movt instructions in
4 /* { dg-do compile } */
5 /* { dg-options "-O1" } */
6 /* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
7 /* { dg-final { scan-assembler-times "addc" 1 } } */
8 /* { dg-final { scan-assembler-times "subc" 1 } } */
9 /* { dg-final { scan-assembler-not "movt" } } */
12 test_000 (int* x
, unsigned int c
)
17 for (i
= 0; i
< c
; ++i
)
18 s
+= ! (x
[i
] & 0x3000);
23 test_001 (int* x
, unsigned int c
)
28 for (i
= 0; i
< c
; ++i
)
29 s
-= ! (x
[i
] & 0x3000);