From 51210a869bc626400462aa79e92caa10bbb96240 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Thu, 19 Jul 2012 10:15:59 -0700 Subject: [PATCH] Support core-avx-i and core-avx2 CPU types. (And map them to avx1.1 and avx2 targets, respectively.) --- ispc.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ispc.cpp b/ispc.cpp index fac83bbe..66521dcc 100644 --- a/ispc.cpp +++ b/ispc.cpp @@ -124,6 +124,9 @@ lGetSystemISA() { static const char *supportedCPUs[] = { "atom", "penryn", "core2", "corei7", "corei7-avx" +#ifdef LLVM_3_2 + , "core-avx-i" +#endif // LLVM_3_2 }; @@ -134,7 +137,9 @@ Target::GetTarget(const char *arch, const char *cpu, const char *isa, if (cpu != NULL) { // If a CPU was specified explicitly, try to pick the best // possible ISA based on that. - if (!strcmp(cpu, "sandybridge") || + if (!strcmp(cpu, "corei7-avx-i")) + isa = "avx1.1"; + else if (!strcmp(cpu, "sandybridge") || !strcmp(cpu, "corei7-avx")) isa = "avx"; else if (!strcmp(cpu, "corei7") ||