Merge branch 'knl-support' of https://github.com/Vsevolod-Livinskij/ispc into knl-support
This commit is contained in:
@@ -1986,9 +1986,11 @@ static FORCEINLINE __vec16_i64 __cast_fptosi(__vec16_i64, __vec16_f val) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static FORCEINLINE __vec16_i32 __cast_fptosi(__vec16_i32, __vec16_d val) {
|
static FORCEINLINE __vec16_i32 __cast_fptosi(__vec16_i32, __vec16_d val) {
|
||||||
__vec16_i32 tmp = _mm512_cvtfxpnt_roundpd_epi32lo(val.v_hi, _MM_ROUND_MODE_TOWARD_ZERO);
|
__m256i tmp = _mm512_cvtpd_epi32(val.v_hi);
|
||||||
__vec16_i32 ret_hi8 = _mm512_permute4f128_epi32(tmp, _MM_PERM_BADC);
|
__vec16_i32 tmp1 = _mm512_castsi256_si512 (tmp);
|
||||||
__vec16_i32 ret_lo8 = _mm512_cvtfxpnt_roundpd_epi32lo(val.v_lo, _MM_ROUND_MODE_TOWARD_ZERO);
|
__vec16_i32 ret_hi8 = _mm512_permute4f128_epi32(tmp1, _MM_PERM_BADC);
|
||||||
|
__m256i tmp2 = _mm512_cvtpd_epi32(val.v_lo);
|
||||||
|
__vec16_i32 ret_lo8 = _mm512_castsi256_si512 (tmp2);
|
||||||
return _mm512_xor_epi32(ret_lo8, ret_hi8);
|
return _mm512_xor_epi32(ret_lo8, ret_hi8);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2050,9 +2052,11 @@ static FORCEINLINE __vec16_i64 __cast_fptoui(__vec16_i64, __vec16_f val) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static FORCEINLINE __vec16_i32 __cast_fptoui(__vec16_i32, __vec16_d val) {
|
static FORCEINLINE __vec16_i32 __cast_fptoui(__vec16_i32, __vec16_d val) {
|
||||||
__vec16_i32 tmp = _mm512_cvtfxpnt_roundpd_epu32lo(val.v_hi, _MM_ROUND_MODE_TOWARD_ZERO);
|
__m256i tmp = _mm512_cvtpd_epu32(val.v_hi);
|
||||||
__vec16_i32 ret_hi8 = _mm512_permute4f128_epi32(tmp, _MM_PERM_BADC);
|
__vec16_i32 tmp1 = _mm512_castsi256_si512 (tmp);
|
||||||
__vec16_i32 ret_lo8 = _mm512_cvtfxpnt_roundpd_epu32lo(val.v_lo, _MM_ROUND_MODE_TOWARD_ZERO);
|
__vec16_i32 ret_hi8 = _mm512_permute4f128_epi32(tmp1, _MM_PERM_BADC);
|
||||||
|
__m256i tmp2 = _mm512_cvtpd_epu32(val.v_lo);
|
||||||
|
__vec16_i32 ret_lo8 = _mm512_castsi256_si512 (tmp2);
|
||||||
return _mm512_xor_epi32(ret_lo8, ret_hi8);
|
return _mm512_xor_epi32(ret_lo8, ret_hi8);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2435,6 +2439,7 @@ static FORCEINLINE double __ceil_uniform_double(double v) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static FORCEINLINE __vec16_f __round_varying_float(__vec16_f v) {
|
static FORCEINLINE __vec16_f __round_varying_float(__vec16_f v) {
|
||||||
|
|
||||||
return _mm512_round_ps(v, _MM_ROUND_MODE_NEAREST, _MM_EXPADJ_NONE);
|
return _mm512_round_ps(v, _MM_ROUND_MODE_NEAREST, _MM_EXPADJ_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
13
examples/intrinsics/known_fails.txt
Normal file
13
examples/intrinsics/known_fails.txt
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
===============================================================================
|
||||||
|
__and_not2 : _mm512_kandnr -> _mm512_kandn
|
||||||
|
./tests/cfor-c-cif-nested-continue.ispc
|
||||||
|
./tests/cfor-c-test-134.ispc
|
||||||
|
./tests/cfor-c-test-135.ispc
|
||||||
|
./tests/cfor-c-test-136.ispc
|
||||||
|
./tests/cfor-c-test-64.ispc
|
||||||
|
./tests/cfor-c-test-70.ispc
|
||||||
|
./tests/cfor-c-test-71.ispc
|
||||||
|
./tests/recursion-forward-func-decl.ispc
|
||||||
|
./tests/recursion.ispc
|
||||||
|
===============================================================================
|
||||||
|
|
||||||
8
ispc.cpp
8
ispc.cpp
@@ -930,12 +930,10 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
// 1. Get default data layout first
|
// 1. Get default data layout first
|
||||||
std::string dl_string;
|
std::string dl_string;
|
||||||
|
|
||||||
#if defined(LLVM_3_2) || defined(LLVM_3_3) || defined(LLVM_3_4) || defined(LLVM_3_5)
|
#if defined(LLVM_3_6)
|
||||||
dl_string = m_targetMachine->getDataLayout()->getStringRepresentation();
|
|
||||||
#elif defined(LLVM_3_6)
|
|
||||||
dl_string = m_targetMachine->getSubtargetImpl()->getDataLayout()->getStringRepresentation();
|
dl_string = m_targetMachine->getSubtargetImpl()->getDataLayout()->getStringRepresentation();
|
||||||
#else // LLVM 3.7+
|
#else // LLVM 3.5- and LLVM 3.7+
|
||||||
dl_string = m_targetMachine->getSubtargetImpl()->getTargetLowering()->getDataLayout()->getStringRepresentation();
|
dl_string = m_targetMachine->getDataLayout()->getStringRepresentation();
|
||||||
#endif
|
#endif
|
||||||
// 2. Adjust for generic
|
// 2. Adjust for generic
|
||||||
if (m_isa == Target::GENERIC) {
|
if (m_isa == Target::GENERIC) {
|
||||||
|
|||||||
@@ -1743,7 +1743,7 @@ static void
|
|||||||
lPrintFunctionDeclarations(FILE *file, const std::vector<Symbol *> &funcs,
|
lPrintFunctionDeclarations(FILE *file, const std::vector<Symbol *> &funcs,
|
||||||
bool useExternC=1, bool rewriteForDispatch=false) {
|
bool useExternC=1, bool rewriteForDispatch=false) {
|
||||||
if (useExternC)
|
if (useExternC)
|
||||||
fprintf(file, "#if defined(__cplusplus) && !defined(__ISPC_NO_EXTERN_C)\nextern \"C\" {\n#endif // __cplusplus\n");
|
fprintf(file, "#if defined(__cplusplus) && (! defined(__ISPC_NO_EXTERN_C) || !__ISPC_NO_EXTERN_C )\nextern \"C\" {\n#endif // __cplusplus\n");
|
||||||
// fprintf(file, "#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n");
|
// fprintf(file, "#ifdef __cplusplus\nextern \"C\" {\n#endif // __cplusplus\n");
|
||||||
for (unsigned int i = 0; i < funcs.size(); ++i) {
|
for (unsigned int i = 0; i < funcs.size(); ++i) {
|
||||||
const FunctionType *ftype = CastType<FunctionType>(funcs[i]->type);
|
const FunctionType *ftype = CastType<FunctionType>(funcs[i]->type);
|
||||||
@@ -1759,7 +1759,7 @@ lPrintFunctionDeclarations(FILE *file, const std::vector<Symbol *> &funcs,
|
|||||||
}
|
}
|
||||||
if (useExternC)
|
if (useExternC)
|
||||||
|
|
||||||
fprintf(file, "#if defined(__cplusplus) && !defined(__ISPC_NO_EXTERN_C)\n} /* end extern C */\n#endif // __cplusplus\n");
|
fprintf(file, "#if defined(__cplusplus) && (! defined(__ISPC_NO_EXTERN_C) || !__ISPC_NO_EXTERN_C )\n} /* end extern C */\n#endif // __cplusplus\n");
|
||||||
// fprintf(file, "#ifdef __cplusplus\n} /* end extern C */\n#endif // __cplusplus\n");
|
// fprintf(file, "#ifdef __cplusplus\n} /* end extern C */\n#endif // __cplusplus\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user