Fix for 3.4
This commit is contained in:
36
ispc.cpp
36
ispc.cpp
@@ -288,7 +288,11 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_isa = Target::SSE2;
|
this->m_isa = Target::SSE2;
|
||||||
this->m_nativeVectorWidth = 4;
|
this->m_nativeVectorWidth = 4;
|
||||||
this->m_vectorWidth = 4;
|
this->m_vectorWidth = 4;
|
||||||
|
#if defined(LLVM_3_4)
|
||||||
|
this->m_attributes = "+sse,+sse2,-sse3,-sse4.1,-sse4.2,-sse4a,-ssse3,-popcnt";
|
||||||
|
#else
|
||||||
this->m_attributes = "+sse,+sse2,-sse3,-sse41,-sse42,-sse4a,-ssse3,-popcnt";
|
this->m_attributes = "+sse,+sse2,-sse3,-sse41,-sse42,-sse4a,-ssse3,-popcnt";
|
||||||
|
#endif
|
||||||
this->m_maskingIsFree = false;
|
this->m_maskingIsFree = false;
|
||||||
this->m_maskBitCount = 32;
|
this->m_maskBitCount = 32;
|
||||||
}
|
}
|
||||||
@@ -297,7 +301,11 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_isa = Target::SSE2;
|
this->m_isa = Target::SSE2;
|
||||||
this->m_nativeVectorWidth = 4;
|
this->m_nativeVectorWidth = 4;
|
||||||
this->m_vectorWidth = 8;
|
this->m_vectorWidth = 8;
|
||||||
|
#if defined(LLVM_3_4)
|
||||||
|
this->m_attributes = "+sse,+sse2,-sse3,-sse4.1,-sse4.2,-sse4a,-ssse3,-popcnt";
|
||||||
|
#else
|
||||||
this->m_attributes = "+sse,+sse2,-sse3,-sse41,-sse42,-sse4a,-ssse3,-popcnt";
|
this->m_attributes = "+sse,+sse2,-sse3,-sse41,-sse42,-sse4a,-ssse3,-popcnt";
|
||||||
|
#endif
|
||||||
this->m_maskingIsFree = false;
|
this->m_maskingIsFree = false;
|
||||||
this->m_maskBitCount = 32;
|
this->m_maskBitCount = 32;
|
||||||
}
|
}
|
||||||
@@ -307,7 +315,11 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_nativeVectorWidth = 4;
|
this->m_nativeVectorWidth = 4;
|
||||||
this->m_vectorWidth = 4;
|
this->m_vectorWidth = 4;
|
||||||
// TODO: why not sse42 and popcnt?
|
// TODO: why not sse42 and popcnt?
|
||||||
|
#if defined(LLVM_3_4)
|
||||||
|
this->m_attributes = "+sse,+sse2,+sse3,+sse4.1,-sse4.2,-sse4a,+ssse3,-popcnt,+cmov";
|
||||||
|
#else
|
||||||
this->m_attributes = "+sse,+sse2,+sse3,+sse41,-sse42,-sse4a,+ssse3,-popcnt,+cmov";
|
this->m_attributes = "+sse,+sse2,+sse3,+sse41,-sse42,-sse4a,+ssse3,-popcnt,+cmov";
|
||||||
|
#endif
|
||||||
this->m_maskingIsFree = false;
|
this->m_maskingIsFree = false;
|
||||||
this->m_maskBitCount = 32;
|
this->m_maskBitCount = 32;
|
||||||
}
|
}
|
||||||
@@ -317,7 +329,11 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_isa = Target::SSE4;
|
this->m_isa = Target::SSE4;
|
||||||
this->m_nativeVectorWidth = 4;
|
this->m_nativeVectorWidth = 4;
|
||||||
this->m_vectorWidth = 8;
|
this->m_vectorWidth = 8;
|
||||||
|
#if defined(LLVM_3_4)
|
||||||
|
this->m_attributes = "+sse,+sse2,+sse3,+sse4.1,-sse4.2,-sse4a,+ssse3,-popcnt,+cmov";
|
||||||
|
#else
|
||||||
this->m_attributes = "+sse,+sse2,+sse3,+sse41,-sse42,-sse4a,+ssse3,-popcnt,+cmov";
|
this->m_attributes = "+sse,+sse2,+sse3,+sse41,-sse42,-sse4a,+ssse3,-popcnt,+cmov";
|
||||||
|
#endif
|
||||||
this->m_maskingIsFree = false;
|
this->m_maskingIsFree = false;
|
||||||
this->m_maskBitCount = 32;
|
this->m_maskBitCount = 32;
|
||||||
}
|
}
|
||||||
@@ -325,7 +341,11 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_isa = Target::SSE4;
|
this->m_isa = Target::SSE4;
|
||||||
this->m_nativeVectorWidth = 16;
|
this->m_nativeVectorWidth = 16;
|
||||||
this->m_vectorWidth = 16;
|
this->m_vectorWidth = 16;
|
||||||
|
#if defined(LLVM_3_4)
|
||||||
|
this->m_attributes = "+sse,+sse2,+sse3,+sse4.1,-sse4.2,-sse4a,+ssse3,-popcnt,+cmov";
|
||||||
|
#else
|
||||||
this->m_attributes = "+sse,+sse2,+sse3,+sse41,-sse42,-sse4a,+ssse3,-popcnt,+cmov";
|
this->m_attributes = "+sse,+sse2,+sse3,+sse41,-sse42,-sse4a,+ssse3,-popcnt,+cmov";
|
||||||
|
#endif
|
||||||
this->m_maskingIsFree = false;
|
this->m_maskingIsFree = false;
|
||||||
this->m_maskBitCount = 8;
|
this->m_maskBitCount = 8;
|
||||||
}
|
}
|
||||||
@@ -333,7 +353,11 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_isa = Target::SSE4;
|
this->m_isa = Target::SSE4;
|
||||||
this->m_nativeVectorWidth = 8;
|
this->m_nativeVectorWidth = 8;
|
||||||
this->m_vectorWidth = 8;
|
this->m_vectorWidth = 8;
|
||||||
|
#if defined(LLVM_3_4)
|
||||||
|
this->m_attributes = "+sse,+sse2,+sse3,+sse4.1,-sse4.2,-sse4a,+ssse3,-popcnt,+cmov";
|
||||||
|
#else
|
||||||
this->m_attributes = "+sse,+sse2,+sse3,+sse41,-sse42,-sse4a,+ssse3,-popcnt,+cmov";
|
this->m_attributes = "+sse,+sse2,+sse3,+sse41,-sse42,-sse4a,+ssse3,-popcnt,+cmov";
|
||||||
|
#endif
|
||||||
this->m_maskingIsFree = false;
|
this->m_maskingIsFree = false;
|
||||||
this->m_maskBitCount = 16;
|
this->m_maskBitCount = 16;
|
||||||
}
|
}
|
||||||
@@ -425,7 +449,11 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_isa = Target::AVX11;
|
this->m_isa = Target::AVX11;
|
||||||
this->m_nativeVectorWidth = 8;
|
this->m_nativeVectorWidth = 8;
|
||||||
this->m_vectorWidth = 8;
|
this->m_vectorWidth = 8;
|
||||||
|
#if defined(LLVM_3_4)
|
||||||
|
this->m_attributes = "+avx,+popcnt,+cmov,+f16c,+rdrnd";
|
||||||
|
#else
|
||||||
this->m_attributes = "+avx,+popcnt,+cmov,+f16c,+rdrand";
|
this->m_attributes = "+avx,+popcnt,+cmov,+f16c,+rdrand";
|
||||||
|
#endif
|
||||||
this->m_maskingIsFree = false;
|
this->m_maskingIsFree = false;
|
||||||
this->m_maskBitCount = 32;
|
this->m_maskBitCount = 32;
|
||||||
this->m_hasHalf = true;
|
this->m_hasHalf = true;
|
||||||
@@ -453,7 +481,11 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_isa = Target::AVX2;
|
this->m_isa = Target::AVX2;
|
||||||
this->m_nativeVectorWidth = 8;
|
this->m_nativeVectorWidth = 8;
|
||||||
this->m_vectorWidth = 8;
|
this->m_vectorWidth = 8;
|
||||||
|
#if defined(LLVM_3_4)
|
||||||
|
this->m_attributes = "+avx2,+popcnt,+cmov,+f16c,+rdrnd"
|
||||||
|
#else
|
||||||
this->m_attributes = "+avx2,+popcnt,+cmov,+f16c,+rdrand"
|
this->m_attributes = "+avx2,+popcnt,+cmov,+f16c,+rdrand"
|
||||||
|
#endif
|
||||||
#ifndef LLVM_3_1
|
#ifndef LLVM_3_1
|
||||||
",+fma"
|
",+fma"
|
||||||
#endif // !LLVM_3_1
|
#endif // !LLVM_3_1
|
||||||
@@ -472,7 +504,11 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
|
|||||||
this->m_isa = Target::AVX2;
|
this->m_isa = Target::AVX2;
|
||||||
this->m_nativeVectorWidth = 16;
|
this->m_nativeVectorWidth = 16;
|
||||||
this->m_vectorWidth = 16;
|
this->m_vectorWidth = 16;
|
||||||
|
#if defined(LLVM_3_4)
|
||||||
|
this->m_attributes = "+avx2,+popcnt,+cmov,+f16c,+rdrnd"
|
||||||
|
#else
|
||||||
this->m_attributes = "+avx2,+popcnt,+cmov,+f16c,+rdrand"
|
this->m_attributes = "+avx2,+popcnt,+cmov,+f16c,+rdrand"
|
||||||
|
#endif
|
||||||
#ifndef LLVM_3_1
|
#ifndef LLVM_3_1
|
||||||
",+fma"
|
",+fma"
|
||||||
#endif // !LLVM_3_1
|
#endif // !LLVM_3_1
|
||||||
|
|||||||
Reference in New Issue
Block a user