Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

AVX512: _mm512_mask2int intrinsic not implemented #28834

Closed Quuxplusone closed 8 years ago

Quuxplusone commented 8 years ago
Bugzilla Link PR28840
Status RESOLVED INVALID
Importance P normal
Reported by Wenzel Jakob (wenzel.jakob@epfl.ch)
Reported on 2016-08-04 07:47:04 -0700
Last modified on 2016-08-14 16:14:59 -0700
Version trunk
Hardware PC All
CC elena.demikhovsky@intel.com, llvm-bugs@lists.llvm.org, michael.zuckerman@intel.com, richard@xmos.com
Fixed by commit(s)
Attachments
Blocks
Blocked by
See also
Compiling the following code with the HEAD revision of LLVM/CLang:

#include <immintrin.h>

int combine(__m512 a, __m512 x) {
    __mmask16 m = _mm512_cmp_ps_mask(a, x, _CMP_GE_OS);
    return _mm512_mask2int(m);
}

yields:

test.cpp:5:12: error: use of undeclared identifier '_mm512_mask2int'
    return _mm512_mask2int(m);
Quuxplusone commented 8 years ago
Hi,
This intrinsics is not part of ISE (319433-023),
and therefore undefined.

Why don't you use int casting?

--Michael
Quuxplusone commented 8 years ago
FWIW it is listed here in the official reference by Intel:
https://software.intel.com/sites/landingpage/IntrinsicsGuide/#expand=3256,1442,1442,1534,3600,2629,2728,2991,5419,5370,3586,647,649,3255&text=_mm512_mask2int

I assume that this intrinsic was created to abstract away implementation
details about the underlying type, though any implementation would probably
implement it with a cast, i.e.:

inline int _mm512_mask2int(__mmask16 k) {
    return (int) k;
}
Quuxplusone commented 8 years ago

I'm marking this as invalid. In retrospect, I suppose this intrinsic may be provided by the Intel compiler, but it's not part of the specs.