<div dir="ltr">When calling the _mm256_cvtps_ph instruction [1] using Clang [2] the following error manifests itself:<br><br>1>------ Build started: Project: CRoaringTest, Configuration: Debug x64 ------<br>1>main.c(19): error : '__builtin_ia32_vcvtps2ph256' needs target feature f16c<br>1>C:\Program Files\LLVM\lib\clang\7.0.0\include\immintrin.h(100):  note: expanded from macro '_mm256_cvtps_ph'<br>1>Done building project "CRoaringTest.vcxproj" -- FAILED.<br>========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========<br><br><br>I'm trying to call the following function:<br><br>__declspec ( noinline ) void float2half ( float * floats, short * halfs ) {<br><br>    _mm_store_si128 ( ( __m128i* ) halfs, _mm256_cvtps_ph ( _mm256_load_ps ( floats ), 0 ) );<br>}<br><br>int main () {<br><br>    float test [ 8 ] = { -0.0f, -1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f };<br>    short rest [ 8 ] = { 0 };<br><br>    float2half ( test, rest );<br><br>    for ( int32_t i = 0; i < 8; ++i ) {<br><br>        printf ( "%i ", ( int ) rest [ i ] );<br>    }<br><br>    printf ( "\n" );<br><br>    return 0;<br>}<br><br><br>I have a Broadwell CPU (i.e. it should work) and VS 15.6.6 compiles this just fine. In Debug the error is shown as per above, in Release, no error, but crashes.<br><br>degski<br><br>[1] <a href="https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_cvtps_ph&expand=1711">https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_mm256_cvtps_ph&expand=1711</a><br>[2] <a href="http://prereleases.llvm.org/win-snapshots/LLVM-7.0.0-r325576-win64.exe">http://prereleases.llvm.org/win-snapshots/LLVM-7.0.0-r325576-win64.exe</a><br></div>