SVE Intrinsics: Change return type of redirect_call to gcall.
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr109011-3.c
blob7b2829520496524b354f85ad84ff51738d732234
1 /* PR tree-optimization/109011 */
2 /* { dg-do compile } */
3 /* { dg-additional-options "-O3 -fno-unroll-loops --param=vect-epilogues-nomask=0 -fdump-tree-optimized" } */
4 /* { dg-additional-options "-mno-avx512cd -mbmi -mlzcnt -mavx512vpopcntdq" { target { { { { i?86-*-* x86_64-*-* } && avx512vpopcntdq } && lzcnt } && bmi } } } */
5 /* { dg-additional-options "-mdejagnu-cpu=power8" { target powerpc_vsx } } */
7 void
8 foo (int *p, int *q)
10 #pragma omp simd
11 for (int i = 0; i < 2048; ++i)
12 p[i] = __builtin_ctz (q[i]);
15 void
16 bar (int *p, int *q)
18 #pragma omp simd
19 for (int i = 0; i < 2048; ++i)
20 p[i] = q[i] ? __builtin_ctz (q[i]) : __SIZEOF_INT__ * __CHAR_BIT__;
23 void
24 baz (int *p, int *q)
26 #pragma omp simd
27 for (int i = 0; i < 2048; ++i)
28 p[i] = __builtin_ffs (q[i]);
31 /* { dg-final { scan-tree-dump-times " = \.POPCOUNT \\\(vect" 3 "optimized" { target { { { { i?86-*-* x86_64-*-* } && avx512vpopcntdq } && lzcnt } && bmi } } } } */
32 /* { dg-final { scan-tree-dump-times " = \.CLZ \\\(vect" 3 "optimized" { target powerpc_vsx } } } */