Debian Codegraph @

gcc/testsuite/gcc.target/msp430/size-optimized-shifts.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-Os" } */
3 /* { dg-final { scan-assembler-not "__mspabi_sral_4" } } */
4 /* { dg-final { scan-assembler-not "__mspabi_srll_4" } } */
5 /* { dg-final { scan-assembler-not "__mspabi_slll_4" } } */
6 /* { dg-final { scan-assembler "__mspabi_sral" } } */
7 /* { dg-final { scan-assembler "__mspabi_srll" } } */
8 /* { dg-final { scan-assembler "__mspabi_slll" } } */
9
10 /* Ensure that SImode shifts by a constant amount do not use the const_variant
11 of the shift library code when optimizing for size. */
12
13 long a;
14 long b;
15 long c;
16 long d;
17 unsigned long e;
18 unsigned long f;
19
20 void
21 foo (void)
22 {
23 a = b >> 4;
24 c = d << 4;
25 e = f >> 4;
26 }