update-unroll-1.c
来自「用于进行gcc测试」· C语言 代码 · 共 23 行
C
23 行
/* { dg-do compile { target i?86-*-* x86_64-*-* } } *//* { dg-require-effective-target ilp32 } *//* { dg-options "-O1 -fprefetch-loop-arrays -march=athlon -fdump-tree-aprefetch-blocks" } */int a[10000];int foo(unsigned n){ unsigned i, s = 0; for (i = 0; i < n; i++) s += a[i]; return s;}/* We used to make the probability that the body of the loop (unrolled to enable prefetching) is entered 0, which is not correct. *//* { dg-final { scan-tree-dump-not "Invalid sum" "aprefetch"} } *//* { dg-final { scan-tree-dump-not "SUCC: 7 .100.0%" "aprefetch"} } *//* { dg-final { cleanup-tree-dump "aprefetch" } } */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?