Skip to content

Fix argument for _mm256_cvtps_ph imm parameter

What does this implement/fix?

During compilation, MSVC generates a C4556 warning due to "_MM_FROUND_NO_EXC" being OR'ed as argument for the imm parameter of the "_mm256_cvtps_ph" intrinsic. The value for "_MM_FROUND_NO_EXC" (0b1000) is out of bounds for imm, since only imm[1:0] and imm[2] are used and imm[7:3] is ignored by the processor according to Intel's Software Developer Manual.

Additional information

https://www.intel.com/content/www/us/en/developer/articles/technical/intel-sdm.html Table 5-13. from Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 2C

A similar problem ( albeit with the 128 bit instruction ) is discussed here: https://developercommunity.visualstudio.com/t/-mm-cvtps-ph-doesnt-accept-mm-fround-no-exc/1343857

Merge request reports

Loading