Oops, forced all sandy bridge CPUs to westmere instead of just Pentium G840

This commit is contained in:
Magnus Norddahl 2016-11-06 07:37:18 +01:00
parent 70d4097b34
commit aad2cde332

View file

@ -497,7 +497,7 @@ void LLVMProgram::CreateEE()
std::string errorstring;
std::string mcpu = sys::getHostCPUName();
if (std::string(CPU.CPUString).find("G840") && mcpu == "sandybridge")
if (std::string(CPU.CPUString).find("G840") != std::string::npos && mcpu == "sandybridge")
mcpu = "westmere"; // Pentium G840 is misdetected as a sandy bridge CPU
if (stricmp(llvm_cpu, "auto") != 0)