| 1 |
/* { dg-options "-O2 -fdump-tree-optimized -fdump-ipa-profile-optimized" } */ |
| 2 |
int a[1000]; |
| 3 |
int b[1000]; |
| 4 |
int size=1; |
| 5 |
int max=10000; |
| 6 |
int |
| 7 |
main() |
| 8 |
{ |
| 9 |
int i; |
| 10 |
for (i=0;i<max; i++) |
| 11 |
{ |
| 12 |
__builtin_memcpy (a, b, size * sizeof (a[0])); |
| 13 |
asm(""); |
| 14 |
} |
| 15 |
return 0; |
| 16 |
} |
| 17 |
/* autofdo doesn't support value profiling for now: */ |
| 18 |
/* { dg-final-use-not-autofdo { scan-ipa-dump "Transformation done: single value 4 stringop" "profile"} } */ |
| 19 |
/* Really this ought to simplify into assignment, but we are not there yet. */ |
| 20 |
/* a[0] = b[0] is what we fold the resulting memcpy into. */ |
| 21 |
/* { dg-final-use-not-autofdo { scan-tree-dump " = MEM.*&b" "optimized"} } */ |
| 22 |
/* { dg-final-use-not-autofdo { scan-tree-dump "MEM.*&a\\\] = " "optimized"} } */ |