Disable popcnt on SSE4 targets--should only enable if system CPU supports it

This commit is contained in:
Matt Pharr
2011-08-26 16:18:28 -07:00
parent 4ab982bc16
commit bbf3fb6307

View File

@@ -132,13 +132,13 @@ Target::GetTarget(const char *arch, const char *cpu, const char *isa,
t->isa = Target::SSE4; t->isa = Target::SSE4;
t->nativeVectorWidth = 4; t->nativeVectorWidth = 4;
t->vectorWidth = 4; t->vectorWidth = 4;
t->attributes = "+sse,+sse2,+sse3,+sse41,+sse42,+sse4a,+ssse3,+popcnt,+cmov"; t->attributes = "+sse,+sse2,+sse3,+sse41,-sse42,-sse4a,+ssse3,-popcnt,+cmov";
} }
else if (!strcasecmp(isa, "sse4x2")) { else if (!strcasecmp(isa, "sse4x2")) {
t->isa = Target::SSE4; t->isa = Target::SSE4;
t->nativeVectorWidth = 4; t->nativeVectorWidth = 4;
t->vectorWidth = 8; t->vectorWidth = 8;
t->attributes = "+sse,+sse2,+sse3,+sse41,+sse42,+sse4a,+ssse3,+popcnt,+cmov"; t->attributes = "+sse,+sse2,+sse3,+sse41,-sse42,-sse4a,+ssse3,-popcnt,+cmov";
} }
#if defined(LLVM_3_0) || defined(LLVM_3_0svn) #if defined(LLVM_3_0) || defined(LLVM_3_0svn)
else if (!strcasecmp(isa, "avx")) { else if (!strcasecmp(isa, "avx")) {