[llvm] eeb4457 - [X86] Add description comments to SandyBridge for COPY/WriteZero/WriteVecMaskedGatherWriteback cases. NFC.

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat May 7 02:42:32 PDT 2022


Author: Simon Pilgrim
Date: 2022-05-07T10:42:19+01:00
New Revision: eeb44579f13d2bf7d7c6769746b11d6425ff0990

URL: https://github.com/llvm/llvm-project/commit/eeb44579f13d2bf7d7c6769746b11d6425ff0990
DIFF: https://github.com/llvm/llvm-project/commit/eeb44579f13d2bf7d7c6769746b11d6425ff0990.diff

LOG: [X86] Add description comments to SandyBridge for COPY/WriteZero/WriteVecMaskedGatherWriteback cases. NFC.

Match other models.

Use X86WriteRes for WriteVecMaskedGatherWriteback like other models as well.

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86SchedSandyBridge.td

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86SchedSandyBridge.td b/llvm/lib/Target/X86/X86SchedSandyBridge.td
index b26004ce19f8a..49858ca0a8001 100644
--- a/llvm/lib/Target/X86/X86SchedSandyBridge.td
+++ b/llvm/lib/Target/X86/X86SchedSandyBridge.td
@@ -111,9 +111,17 @@ def : WriteRes<WriteStore,   [SBPort23, SBPort4]>;
 def : WriteRes<WriteStoreNT, [SBPort23, SBPort4]>;
 def : WriteRes<WriteLoad,    [SBPort23]> { let Latency = 5; }
 def : WriteRes<WriteMove,    [SBPort015]>;
+
+// Treat misc copies as a move.
 def : InstRW<[WriteMove], (instrs COPY)>;
+
+// Idioms that clear a register, like xorps %xmm0, %xmm0.
+// These can often bypass execution ports completely.
 def : WriteRes<WriteZero,    []>;
-def : WriteRes<WriteVecMaskedGatherWriteback, []> { let Latency = 5; let NumMicroOps = 0; }
+
+// Model the effect of clobbering the read-write mask operand of the GATHER operation.
+// Does not cost anything by itself, only has latency, matching that of the WriteLoad,
+defm : X86WriteRes<WriteVecMaskedGatherWriteback, [], 5, [], 0>;
 
 // Arithmetic.
 defm : SBWriteResPair<WriteALU,    [SBPort015], 1>;


        


More information about the llvm-commits mailing list