2011-10-15 68 views

回答

8

大多數GCC交換機都可以使用前綴no來禁用它們的行爲。試用-fno-tree-vectorize(在命令行上輸入-O3後)。

0

非常好,現在gcc已經變得更具侵略性,

extern "C" __attribute__((optimize("no-tree-vectorize"))) 
/* Subroutine */ 
int s111_ (integer * ntimes, integer * ld, integer * n, 
      real * ctime, real * dtime, 
      real * __restrict a, real * b, real * c__, real * d__, 
      real * e, real * aa, real * bb, real * cc) 
{ 
    .... 
    for (i__ = 2; i__ <= i__2; i__ += 2) 
     a[i__] = a[i__ - 1] + b[i__]; 
    .... 

在上述情況下發布,刪除restrict用來做的工作,但現在G ++ 6.0不能從矢量化通過去除__restrict停止。