Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

_mm_popcnt_u32 function in icpx

watanabeh
Beginner
676 Views

I have compiler update project, intel c++ compiler 19.1 to intel c++ compiker 2022.

My source code includes nmmintrin.h functions, and got error when compiling with intel c++ compiker 2022.

 

error : always_inline function '_mm_popcnt_u32' requires target feature 'popcnt', but would be inlined into function 'xxxxxxxxxxx' that is compiled without support for 'popcnt'

 

How can I use nmmintrin.h functions with intel c++ compiker 2022 ?

 

thank you.

 

0 Kudos
4 Replies
NoorjahanSk_Intel
Moderator
640 Views

Hi,


Thanks for reaching out to us.


Could you please try using the flag "-march=native" while compiling your code with Intel C++ compiler 2022.


Please refer to the below link for more details regarding the "march" flag:

https://www.intel.com/content/www/us/en/develop/documentation/oneapi-dpcpp-cpp-compiler-dev-guide-and-reference/top/compiler-reference/compiler-options/code-generation-options/march.html


Hope this helps to resolve your issue. If not, please provide us with a sample reproducer and the steps you have followed to reproduce the issue so that we can try it from our end.

Also please provide the OS details that is being used to compile your code.


Thanks & Regards,

Noorjahan.


0 Kudos
NoorjahanSk_Intel
Moderator
571 Views

Hi,


We haven't heard back from you. Could you please provide an update on your issue?


Thanks & Regards,

Noorjahan.


0 Kudos
watanabeh
Beginner
550 Views

thank you for your repply.

 

sorry for undufficient information, I use visual studio , so "march" option is not work for me.

 

I build with "Qintrinsic-promote" option, it works.

 

thank you.

 

0 Kudos
NoorjahanSk_Intel
Moderator
535 Views

Hi,


Glad to know that your issue is resolved. Thanks for sharing the solution with us. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.


Thanks & Regards,

Noorjahan


0 Kudos
Reply