vect-outer-1a.c

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

C
29
字号
/* { dg-do compile } */#define N 40signed short image[N][N] __attribute__ ((__aligned__(16)));signed short block[N][N] __attribute__ ((__aligned__(16)));/* Can't do outer-loop vectorization because of non-consecutive access.   Currently fails to vectorize because the reduction pattern is not   recognized.  */intfoo (){  int i,j;  int diff = 0;  for (i = 0; i < N; i++) {    for (j = 0; j < N; j+=8) {      diff += (image[i][j] - block[i][j]);    }  }  return diff;}/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } *//* FORNOW *//* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" { xfail *-*-* } } } *//* { dg-final { scan-tree-dump-times "unexpected pattern" 1 "vect" } } *//* { dg-final { cleanup-tree-dump "vect" } } */

⌨️ 快捷键说明

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