1 /* The dynamic shift library functions truncate the shift count to 5 bits.
2 Verify that this is taken into account and no extra shift count
3 truncations are generated before the library call. */
4 /* { dg-do compile { target "sh*-*-*" } } */
5 /* { dg-options "-O1" } */
6 /* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m1*" "-m2" "-m2e*" } } */
7 /* { dg-final { scan-assembler-not "and" } } */
8 /* { dg-final { scan-assembler-not "31" } } */
11 test00 (unsigned int a
, int* b
, int c
, int* d
, unsigned int e
)
15 for (i
= 0; i
< c
; ++i
)
16 s
+= d
[i
] + b
[i
] + (e
<< (i
& 31));
21 test01 (unsigned int a
, int* b
, int c
, int* d
, unsigned int e
)
25 for (i
= 0; i
< c
; ++i
)
26 s
+= d
[i
] + b
[i
] + (e
>> (i
& 31));
31 test03 (unsigned int a
, unsigned int b
)
37 test04 (unsigned int a
, int b
)