vect-outer-4b.c

来自「用于进行gcc测试」· C语言 代码 · 共 32 行

C
32
字号
/* { dg-do compile } */#define N 40#define M 128signed short in[N+M];signed short coeff[M];int out[N];/* Outer-loop vectorization.   Currently not vectorized because of multiple-data-types in the inner-loop.  */voidfoo (){  int i,j;  int diff;  for (i = 0; i < N; i++) {    diff = 0;    for (j = 0; j < M; j+=8) {      diff += in[j+i]*coeff[j];     }    out[i]=diff;  }}/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } *//* FORNOW. not vectorized until we support 0-stride acceses like coeff[j]. should be:   { scan-tree-dump-not "multiple types in nested loop." "vect" { xfail *-*-* } } } *//* { dg-final { scan-tree-dump-times "zero step in outer loop." 1  "vect" } } *//* { dg-final { cleanup-tree-dump "vect" } } */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?