aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/avx-vptest-4.c
blob: 0a234e154ad93952c9343c05fe1d7888bd85d685 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-options "-O2 -mavx" } */

typedef long long __m256i __attribute__ ((__vector_size__ (32)));

int foo (__m256i x, __m256i y)
{
  __m256i a = x & ~y;
  return __builtin_ia32_ptestz256 (a, a);
}

int bar (__m256i x, __m256i y)
{
  __m256i a = ~x & y;
  return __builtin_ia32_ptestz256 (a, a);
}

/* { dg-final { scan-assembler-times "vptest\[ \\t\]+%" 2 } } */
/* { dg-final { scan-assembler-times "setc" 2 } } */
/* { dg-final { scan-assembler-not "vpandn" } } */
/* { dg-final { scan-assembler-not "sete" } } */