Beispiel #1
0
void static
avx2_test (void)
{
  union256i_q s1, res;
  union128i_q s2;
  long long int res_ref[4];
  int i, j;
  int fail = 0;

  for (i = 0; i < 10; i++)
    {
      for (j = 0; j < 4; j++)
	s1.a[j] = j * i;

      s2.a[0] = i;

      res.x = _mm256_srl_epi64 (s1.x, s2.x);

      compute_psrlq256 (s1.a, s2.a, res_ref);

      fail += check_union256i_q (res, res_ref);
    }

  if (fail != 0)
    abort ();
}
Beispiel #2
0
__m256i test_mm256_srl_epi64(__m256i a, __m128i b) {
  // CHECK: @llvm.x86.avx2.psrl.q
  return _mm256_srl_epi64(a, b);
}
__m256i test_mm256_srl_epi64(__m256i a, __m128i b) {
  // CHECK-LABEL: test_mm256_srl_epi64
  // CHECK: call <4 x i64> @llvm.x86.avx2.psrl.q(<4 x i64> %{{.*}}, <2 x i64> %{{.*}})
  return _mm256_srl_epi64(a, b);
}