Beispiel #1
0
static void
avx2_test (void)
{
  union128i_w s;
  union256i_q res;
  long long int res_ref[4];

  s.x = _mm_set_epi16 (1, 2, 3, 4, -200, 50, 6, 8);

  res.x = _mm256_cvtepi16_epi64 (s.x);

  compute_movsxwq (s.a, res_ref);

  if (check_union256i_q (res, res_ref))
    abort ();
}
Beispiel #2
0
__m256i test_mm256_cvtepi16_epi64(__m128i a) {
  // CHECK: @llvm.x86.avx2.pmovsxwq
  return _mm256_cvtepi16_epi64(a);
}
__m256i test_mm256_cvtepi16_epi64(__m128i a) {
  // CHECK-LABEL: test_mm256_cvtepi16_epi64
  // CHECK: shufflevector <8 x i16> %{{.*}}, <8 x i16> %{{.*}}, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
  // CHECK: sext <4 x i16> %{{.*}} to <4 x i64>
  return _mm256_cvtepi16_epi64(a);
}