[llvm] r329686 - [X86][Broadwell] HWPort5 should not be added to BroadwellModelProcResources.

Andrea Di Biagio via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 10 03:49:41 PDT 2018


Author: adibiagio
Date: Tue Apr 10 03:49:41 2018
New Revision: 329686

URL: http://llvm.org/viewvc/llvm-project?rev=329686&view=rev
Log:
[X86][Broadwell] HWPort5 should not be added to BroadwellModelProcResources.

The BroadwellModelProcResources had an entry for HWPort5, which is a Haswell
resource, and not a Broadwell processor resource. That entry was added to the
Broadwell model because variable blends were consuming it.

This was clearly a typo (the resource name should have been BWPort5), which
unfortunately was never caught before. It was not reported as an error because
HWPort5 is a resource defined by the Haswell model. It has been found when
testing some code with llvm-mca: the list of resources in the resource pressure
view was odd.

This patch fixes the issue; now variable blend instructions consume 2 cycles on
BWPort5 instead of HWPort5. This is enough to get rid of the extra (spurious)
entry in the BroadWellModelProcResources table.


Modified:
    llvm/trunk/lib/Target/X86/X86SchedBroadwell.td

Modified: llvm/trunk/lib/Target/X86/X86SchedBroadwell.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86SchedBroadwell.td?rev=329686&r1=329685&r2=329686&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86SchedBroadwell.td (original)
+++ llvm/trunk/lib/Target/X86/X86SchedBroadwell.td Tue Apr 10 03:49:41 2018
@@ -163,7 +163,7 @@ defm : BWWriteResPair<WriteFRsqrt, [BWPo
 defm : BWWriteResPair<WriteFMA,    [BWPort01], 5>; // Fused Multiply Add.
 defm : BWWriteResPair<WriteFShuffle,  [BWPort5],  1>; // Floating point vector shuffles.
 defm : BWWriteResPair<WriteFBlend,  [BWPort015],  1>; // Floating point vector blends.
-defm : BWWriteResPair<WriteFVarBlend,  [HWPort5], 2, [2]>; // Fp vector variable blends.
+defm : BWWriteResPair<WriteFVarBlend,  [BWPort5], 2, [2]>; // Fp vector variable blends.
 
 // FMA Scheduling helper class.
 // class FMASC { X86FoldableSchedWrite Sched = WriteFAdd; }




More information about the llvm-commits mailing list