Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/vect/pr33426-ivdep-2.cc @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-do compile } */ /* { dg-require-effective-target vect_int } */ /* { dg-additional-options "-O3 -fopt-info-vec-optimized -fdump-tree-original -fdump-tree-gimple" } */ /* PR other/33426 */ /* Testing whether #pragma ivdep is working. */ void foo(int n, int *a, int *b, int *c) { int i; i = 0; #pragma GCC ivdep while(i < n) { a[i] = b[i] + c[i]; ++i; } } void bar(int n, int *a, int *b, int *c) { int i; i = 0; #pragma GCC ivdep do { a[i] = b[i] + c[i]; ++i; } while(i < n); } /* { dg-message "loop vectorized" "" { target *-*-* } 0 } */ /* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */ /* { dg-prune-output " version\[^\n\r]* alignment" } */ /* { dg-final { scan-tree-dump-times "ANNOTATE_EXPR " 2 "original" } } */ /* { dg-final { scan-tree-dump-times "ANNOTATE " 2 "gimple" } } */