Debian Codegraph @

gcc/testsuite/gcc.target/cris/pr93372-37.c

raw
1 /* Check that we produce sign- and zero-extended additions and
2 subtractions, and that no (eliminable) test- or compare-instructions
3 are used. */
4 /* { dg-do compile } */
5 /* { dg-options "-O2" } */
6 /* { dg-final { scan-assembler-not {\tcmp|\ttest|\tsub\.|\tadd\.|\tmovu|\tmovs} } } */
7 /* { dg-final { scan-assembler-times "\tadds" 1 } } */
8 /* { dg-final { scan-assembler-times "\tsubs" 1 } } */
9 /* { dg-final { scan-assembler-times "\taddu" 2 } } */
10 /* { dg-final { scan-assembler-times "\tsubu" 2 } } */
11
12 #define t unsigned char
13 #define s _uc
14 #include "pr93372-36.c"
15
16 #undef t
17 #undef s
18 #define t signed short int
19 #define s _ss
20 #include "pr93372-36.c"
21
22 #undef t
23 #undef s
24 #define t unsigned short int
25 #define s _us
26 #include "pr93372-36.c"