1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-forwprop2-details -Wno-shift-count-negative" } */
6 static const char table
[32] =
8 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8,
9 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9
12 return table
[((int)((x
& -x
) * -0x077CB531)) >> 27];
15 int ctz_ice2 (unsigned x
)
17 static const char table
[32] =
19 0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8,
20 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9
23 return table
[((unsigned)((x
& -x
) * 0x077CB531U
)) >> -27];
26 // This should never match
27 int ctz_fail (unsigned x
)
29 static const unsigned short int table
[32] =
30 u
"\x0100\x021c\x0e1d\x0318\x161e\x0f14\x1119\x0804\x1b1f\x170d\x1315\x0710\x0c1a\x0612\x050b\x090a";
32 return table
[((x
& -x
) * 0x077CB531) >> 27];
35 /* { dg-final { scan-tree-dump-not {= \.CTZ} "forwprop2" } } */