diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2014-01-26 06:09:59 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2014-01-26 06:09:59 +0000 |
commit | ead3b3d7a1f4ada0d7eb8cc46185fbea4a58060f (patch) | |
tree | cadae072a7745f3e4dd3103b06f83263238b01d3 /llvm/lib/Target/Sparc/Sparc.td | |
parent | 39f0833f47a8ed1cf372cf1bf84908bf49cfb308 (diff) | |
download | bcm5719-llvm-ead3b3d7a1f4ada0d7eb8cc46185fbea4a58060f.tar.gz bcm5719-llvm-ead3b3d7a1f4ada0d7eb8cc46185fbea4a58060f.zip |
Only generate the popc instruction for SPARC CPUs that implement it.
The popc instruction is defined in the SPARCv9 instruction set
architecture, but it was emulated on CPUs older than Niagara 2.
llvm-svn: 200131
Diffstat (limited to 'llvm/lib/Target/Sparc/Sparc.td')
-rw-r--r-- | llvm/lib/Target/Sparc/Sparc.td | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Target/Sparc/Sparc.td b/llvm/lib/Target/Sparc/Sparc.td index 9f6992de2f1..ab86dc9c311 100644 --- a/llvm/lib/Target/Sparc/Sparc.td +++ b/llvm/lib/Target/Sparc/Sparc.td @@ -34,6 +34,9 @@ def FeatureHardQuad : SubtargetFeature<"hard-quad-float", "HasHardQuad", "true", "Enable quad-word floating point instructions">; +def UsePopc : SubtargetFeature<"popc", "UsePopc", "true", + "Use the popc (population count) instruction">; + //===----------------------------------------------------------------------===// // Register File, Calling Conv, Instruction Descriptions //===----------------------------------------------------------------------===// @@ -69,9 +72,9 @@ def : Proc<"v9", [FeatureV9]>; def : Proc<"ultrasparc", [FeatureV9, FeatureV8Deprecated]>; def : Proc<"ultrasparc3", [FeatureV9, FeatureV8Deprecated]>; def : Proc<"niagara", [FeatureV9, FeatureV8Deprecated]>; -def : Proc<"niagara2", [FeatureV9, FeatureV8Deprecated]>; -def : Proc<"niagara3", [FeatureV9, FeatureV8Deprecated]>; -def : Proc<"niagara4", [FeatureV9, FeatureV8Deprecated]>; +def : Proc<"niagara2", [FeatureV9, FeatureV8Deprecated, UsePopc]>; +def : Proc<"niagara3", [FeatureV9, FeatureV8Deprecated, UsePopc]>; +def : Proc<"niagara4", [FeatureV9, FeatureV8Deprecated, UsePopc]>; //===----------------------------------------------------------------------===// |