2009-07-17 Richard Guenther <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / mips / octeon-exts-4.c
blob7e6a578a19ceec9e310416d1ac0ce951ea32a12d
1 /* { dg-do compile } */
2 /* { dg-options "-O -march=octeon -mgp64" } */
3 /* { dg-final { scan-assembler-not "\tsll\t\[^\n\]*,0" } } */
4 /* { dg-final { scan-assembler-times "\texts\t" 6 } } */
6 #define TEST(ID, TYPE, SHIFT) \
7 int NOMIPS16 \
8 f##ID (long long y) \
9 { \
10 return (TYPE) ((TYPE) (y >> SHIFT) + 1); \
11 } \
12 int NOMIPS16 \
13 g##ID (unsigned long long y) \
14 { \
15 return (TYPE) ((TYPE) (y >> SHIFT) + 1); \
18 TEST (1, int, 10)
19 TEST (2, short, 5)
20 TEST (3, char, 31)