summaryrefslogtreecommitdiffstats
path: root/config.tests/common
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2017-04-03 15:41:44 -0700
committerThiago Macieira <thiago.macieira@intel.com>2017-04-06 04:15:04 +0000
commitc817b33b45f2886c89d8a768c61ffffaa46f67a4 (patch)
tree98e39e893502c4c03b54ba8d00276aed701910e1 /config.tests/common
parent264d814773a15806df497e872e4b19c613c94725 (diff)
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 <allan.jensen@qt.io>
Diffstat (limited to 'config.tests/common')
-rw-r--r--config.tests/common/f16c/f16c.cpp11
1 files changed, 4 insertions, 7 deletions
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;
}