nvcc not recognising "_popcnt64" intrinsic from Intel compiler

In Kokkos library there is a piece of code in a C++/CUDA mixed source file where _popcnt64 intrinsic from Intel compiler is used. The code looks like

#include <immintrin.h>
int pop_count(unsigned long long i) {
#if defined( __CUDA_ARCH__ )
  return __popcll(i);
#elif defined(__INTEL_COMPILER)
  return _popcnt64(i);
#endif
}
// ...

When compiling the code, the command looking like below is invoked:

nvcc -x cu -ccbin icpc hello.cpp

Then an error occurs:

hello.cpp(8): error: identifier "_popcnt64" is undefined

1 error detected in the compilation of "/tmp/tmpxft_00002ff7_00000000-10_hello.cpp1.ii".

The snippet shown compiles just fine for me. Since I am on Windows I used

nvcc -x cu -ccbin icl hello.cpp

What CUDA version are you using, and which version of the Intel compiler?

I am using CUDA 10.1.168 with Intel Compiler 19.0.5.281 on Ubuntu 18.04.3 LTS.

What CUDA and ICC version are you using?

I was able to reproduce the error on CUDA 10.1.158 and icc 18.0 tools.
The error is actually being emitted by cudafe++ which is one of the internal tools that nvcc uses.

It looks like a (nvcc) compiler issue to me, however there is additional work that I would normally do before I would file a bug.

If you wish to short-circuit the process, you’re welcome to file a bug yourself. For full visibility on your end, that would be my recommendation.

I seem to recall multiple similar problems with x86 intrinsics in the past. I would recommend moving host code with such intrinsics into separate files that are compiled directly with the host compiler, if that is possible.