Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/pr118637.c

raw
1 /* PR tree-optimization/118637 */
2 /* { dg-do compile { target clz } } */
3 /* { dg-options "-O2 -fdump-tree-optimized" } */
4 /* { dg-final { scan-tree-dump-times "__builtin_clz|\\.CLZ" 2 "optimized" } } */
5
6 __attribute__((noipa)) unsigned
7 foo (unsigned x)
8 {
9 unsigned result = 0;
10 while (x /= 2)
11 ++result;
12 return result;
13 }
14
15 __attribute__((noipa)) unsigned
16 bar (unsigned x)
17 {
18 unsigned result = 0;
19 while (x >>= 1)
20 ++result;
21 return result;
22 }