111
|
1 /* { dg-do run { target { { i?86-*-* x86_64-*-* } && lp64 } } } */
|
131
|
2 /* { dg-options "-g -fno-ipa-icf" } */
|
111
|
3
|
|
4 volatile int vv;
|
|
5
|
|
6 __attribute__((noinline, noclone)) long
|
|
7 foo (long x)
|
|
8 {
|
|
9 long f = __builtin_ctzl (x);
|
|
10 long g = f;
|
|
11 asm volatile ("" : "+r" (f));
|
131
|
12 vv++; /* { dg-final { gdb-test . "g" "f" } } */
|
111
|
13 return f;
|
|
14 }
|
|
15
|
|
16 __attribute__((noinline, noclone)) long
|
|
17 bar (long x)
|
|
18 {
|
|
19 long f = __builtin_ctzl (x);
|
|
20 long g = f;
|
|
21 asm volatile ("" : "+r" (f));
|
131
|
22 vv++; /* { dg-final { gdb-test . "g" "f" } } */
|
111
|
23 return f;
|
|
24 }
|
|
25
|
|
26 int
|
|
27 main ()
|
|
28 {
|
|
29 long x = vv;
|
|
30 foo (x + 0x1234560UL);
|
|
31 bar (x + 0x7fff8000UL);
|
|
32 return 0;
|
|
33 }
|