[llvm] r330358 - [X86] Enable popcnt false dependency breaking on Silvermont and Goldmont.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 19 12:25:25 PDT 2018


Author: ctopper
Date: Thu Apr 19 12:25:24 2018
New Revision: 330358

URL: http://llvm.org/viewvc/llvm-project?rev=330358&view=rev
Log:
[X86] Enable popcnt false dependency breaking on Silvermont and Goldmont.

Silvermont and Goldmont have the same issue on popcnt as Sandy Bridge, Haswell, Broadwell, and Skylake. Believe it is fixed in Goldmont Plus.

Modified:
    llvm/trunk/lib/Target/X86/X86.td
    llvm/trunk/test/CodeGen/X86/bitcnt-false-dep.ll

Modified: llvm/trunk/lib/Target/X86/X86.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86.td?rev=330358&r1=330357&r2=330358&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86.td (original)
+++ llvm/trunk/lib/Target/X86/X86.td Thu Apr 19 12:25:24 2018
@@ -563,7 +563,8 @@ class SilvermontProc<string Name> : Proc
   FeatureSlowIncDec,
   FeatureSlowPMULLD,
   FeatureRDRAND,
-  FeatureLAHFSAHF
+  FeatureLAHFSAHF,
+  FeaturePOPCNTFalseDeps
 ]>;
 def : SilvermontProc<"silvermont">;
 def : SilvermontProc<"slm">; // Legacy alias.
@@ -607,7 +608,10 @@ def GLMFeatures : ProcessorFeatures<[],
 ]>;
 
 class GoldmontProc<string Name> : ProcModel<Name, SLMModel,
-      GLMFeatures.Value, [ ProcIntelGLM ]>;
+      GLMFeatures.Value, [
+  ProcIntelGLM,
+  FeaturePOPCNTFalseDeps
+]>;
 def : GoldmontProc<"goldmont">;
 
 class GoldmontPlusProc<string Name> : ProcModel<Name, SLMModel,

Modified: llvm/trunk/test/CodeGen/X86/bitcnt-false-dep.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/bitcnt-false-dep.ll?rev=330358&r1=330357&r2=330358&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/bitcnt-false-dep.ll (original)
+++ llvm/trunk/test/CodeGen/X86/bitcnt-false-dep.ll Thu Apr 19 12:25:24 2018
@@ -1,6 +1,8 @@
-; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=haswell -mattr=+lzcnt | FileCheck %s --check-prefix=HSW
-; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=skylake -mattr=+lzcnt | FileCheck %s --check-prefix=SKL
-; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=skx -mattr=+lzcnt | FileCheck %s --check-prefix=SKL
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=haswell | FileCheck %s --check-prefix=HSW
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=skylake | FileCheck %s --check-prefix=SKL
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=skx | FileCheck %s --check-prefix=SKL
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=silvermont -mattr=+lzcnt,+bmi | FileCheck %s --check-prefix=SKL
+; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu -mcpu=goldmont -mattr=+lzcnt,+bmi | FileCheck %s --check-prefix=SKL
 
 ; This tests a fix for bugzilla 33869 https://bugs.llvm.org/show_bug.cgi?id=33869
 




More information about the llvm-commits mailing list