1263320SdimPull in r199024 from upstream llvm trunk (by Venkatraman Govindaraju): 2263320Sdim 3263320Sdim [Sparc] Add missing processor types: v7 and niagara 4263320Sdim 5269012SemasteIntroduced here: http://svnweb.freebsd.org/changeset/base/262261 6263320Sdim 7263320SdimIndex: lib/Target/Sparc/Sparc.td 8263320Sdim=================================================================== 9263320Sdim--- lib/Target/Sparc/Sparc.td 10263320Sdim+++ lib/Target/Sparc/Sparc.td 11263320Sdim@@ -56,6 +56,7 @@ class Proc<string Name, list<SubtargetFeature> Fea 12263320Sdim : Processor<Name, NoItineraries, Features>; 13263320Sdim 14263320Sdim def : Proc<"generic", []>; 15263320Sdim+def : Proc<"v7", []>; 16263320Sdim def : Proc<"v8", []>; 17263320Sdim def : Proc<"supersparc", []>; 18263320Sdim def : Proc<"sparclite", []>; 19263320Sdim@@ -67,7 +68,10 @@ def : Proc<"tsc701", []>; 20263320Sdim def : Proc<"v9", [FeatureV9]>; 21263320Sdim def : Proc<"ultrasparc", [FeatureV9, FeatureV8Deprecated]>; 22263320Sdim def : Proc<"ultrasparc3", [FeatureV9, FeatureV8Deprecated]>; 23263320Sdim-def : Proc<"ultrasparc3-vis", [FeatureV9, FeatureV8Deprecated, FeatureVIS]>; 24263320Sdim+def : Proc<"niagara", [FeatureV9, FeatureV8Deprecated]>; 25263320Sdim+def : Proc<"niagara2", [FeatureV9, FeatureV8Deprecated]>; 26263320Sdim+def : Proc<"niagara3", [FeatureV9, FeatureV8Deprecated]>; 27263320Sdim+def : Proc<"niagara4", [FeatureV9, FeatureV8Deprecated]>; 28263320Sdim 29263320Sdim def SparcAsmWriter : AsmWriter { 30263320Sdim string AsmWriterClassName = "InstPrinter"; 31263320SdimIndex: lib/Target/Sparc/SparcSubtarget.cpp 32263320Sdim=================================================================== 33263320Sdim--- lib/Target/Sparc/SparcSubtarget.cpp 34263320Sdim+++ lib/Target/Sparc/SparcSubtarget.cpp 35263320Sdim@@ -35,13 +35,8 @@ SparcSubtarget::SparcSubtarget(const std::string & 36263320Sdim 37263320Sdim // Determine default and user specified characteristics 38263320Sdim std::string CPUName = CPU; 39263320Sdim- if (CPUName.empty()) { 40263320Sdim- if (is64Bit) 41263320Sdim- CPUName = "v9"; 42263320Sdim- else 43263320Sdim- CPUName = "v8"; 44263320Sdim- } 45263320Sdim- IsV9 = CPUName == "v9"; 46263320Sdim+ if (CPUName.empty()) 47263320Sdim+ CPUName = (is64Bit) ? "v9" : "v8"; 48263320Sdim 49263320Sdim // Parse features string. 50263320Sdim ParseSubtargetFeatures(CPUName, FS); 51263320SdimIndex: test/CodeGen/SPARC/ctpop.ll 52263320Sdim=================================================================== 53263320Sdim--- test/CodeGen/SPARC/ctpop.ll 54263320Sdim+++ test/CodeGen/SPARC/ctpop.ll 55263320Sdim@@ -1,6 +1,13 @@ 56263320Sdim ; RUN: llc < %s -march=sparc -mattr=-v9 | FileCheck %s -check-prefix=V8 57263320Sdim ; RUN: llc < %s -march=sparc -mattr=+v9 | FileCheck %s -check-prefix=V9 58263320Sdim-; RUN: llc < %s -march=sparcv9 | FileCheck %s -check-prefix=SPARC64 59263320Sdim+; RUN: llc < %s -march=sparc -mcpu=v9 | FileCheck %s -check-prefix=V9 60263320Sdim+; RUN: llc < %s -march=sparc -mcpu=ultrasparc | FileCheck %s -check-prefix=V9 61263320Sdim+; RUN: llc < %s -march=sparc -mcpu=ultrasparc3 | FileCheck %s -check-prefix=V9 62263320Sdim+; RUN: llc < %s -march=sparc -mcpu=niagara | FileCheck %s -check-prefix=V9 63263320Sdim+; RUN: llc < %s -march=sparc -mcpu=niagara2 | FileCheck %s -check-prefix=V9 64263320Sdim+; RUN: llc < %s -march=sparc -mcpu=niagara3 | FileCheck %s -check-prefix=V9 65263320Sdim+; RUN: llc < %s -march=sparc -mcpu=niagara4 | FileCheck %s -check-prefix=V9 66263320Sdim+; RUN: llc < %s -march=sparcv9 | FileCheck %s -check-prefix=SPARC64 67263320Sdim 68263320Sdim declare i32 @llvm.ctpop.i32(i32) 69263320Sdim 70