Fix for 3.4

This commit is contained in:
james.brodman
2013-08-27 15:15:16 -04:00
parent f6ce969d9f
commit be3a40e70b

View File

@@ -288,7 +288,11 @@ Target::Target(const char *arch, const char *cpu, const char *isa, bool pic) :
this->m_isa = Target::SSE2;
this->m_nativeVectorWidth = 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";
#endif
this->m_maskingIsFree = false;
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_nativeVectorWidth = 4;
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";
#endif
this->m_maskingIsFree = false;
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_vectorWidth = 4;
// 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";
#endif
this->m_maskingIsFree = false;
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_nativeVectorWidth = 4;
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";
#endif
this->m_maskingIsFree = false;
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_nativeVectorWidth = 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";
#endif
this->m_maskingIsFree = false;
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_nativeVectorWidth = 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";
#endif
this->m_maskingIsFree = false;
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_nativeVectorWidth = 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";
#endif
this->m_maskingIsFree = false;
this->m_maskBitCount = 32;
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_nativeVectorWidth = 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"
#endif
#ifndef LLVM_3_1
",+fma"
#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_nativeVectorWidth = 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"
#endif
#ifndef LLVM_3_1
",+fma"
#endif // !LLVM_3_1