From c817b33b45f2886c89d8a768c61ffffaa46f67a4 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 3 Apr 2017 15:41:44 -0700 Subject: f16c: Use the packed intrinsics instead of scalar ones MSVC, Apple's Clang and Clang prior to 3.9 do not recognize _cvtss_sh and _cvtsh_ss. So expand the operation to use directly the packed intrinsics. Change-Id: I27b55fdf514247549455fffd14b2046fd638593d Reviewed-by: Allan Sandfeld Jensen --- config.tests/common/f16c/f16c.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'config.tests') diff --git a/config.tests/common/f16c/f16c.cpp b/config.tests/common/f16c/f16c.cpp index fc73e4fc55..aeeb35eac3 100644 --- a/config.tests/common/f16c/f16c.cpp +++ b/config.tests/common/f16c/f16c.cpp @@ -41,14 +41,11 @@ int main(int, char**) { - float f = 1.f; - unsigned short s = _cvtss_sh(f, 0); - float g = _cvtsh_ss(s); - bool result = f == g; - (void)result; __m128i a = _mm_setzero_si128(); - __m256 b = _mm256_cvtph_ps(a); - __m128i c = _mm256_cvtps_ph(b, 0); + __m128 b = _mm_cvtph_ps(a); + __m256 b256 = _mm256_cvtph_ps(a); + __m128i c = _mm_cvtps_ph(b, 0); + c = _mm256_cvtps_ph(b256, 0); (void)c; return 0; } -- cgit v1.2.3