Skip to content

Commit eeb4457

Browse files
committed
[X86] Add description comments to SandyBridge for COPY/WriteZero/WriteVecMaskedGatherWriteback cases. NFC.
Match other models. Use X86WriteRes for WriteVecMaskedGatherWriteback like other models as well.
1 parent 2db46db commit eeb4457

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

llvm/lib/Target/X86/X86SchedSandyBridge.td

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,17 @@ def : WriteRes<WriteStore, [SBPort23, SBPort4]>;
111111
def : WriteRes<WriteStoreNT, [SBPort23, SBPort4]>;
112112
def : WriteRes<WriteLoad, [SBPort23]> { let Latency = 5; }
113113
def : WriteRes<WriteMove, [SBPort015]>;
114+
115+
// Treat misc copies as a move.
114116
def : InstRW<[WriteMove], (instrs COPY)>;
117+
118+
// Idioms that clear a register, like xorps %xmm0, %xmm0.
119+
// These can often bypass execution ports completely.
115120
def : WriteRes<WriteZero, []>;
116-
def : WriteRes<WriteVecMaskedGatherWriteback, []> { let Latency = 5; let NumMicroOps = 0; }
121+
122+
// Model the effect of clobbering the read-write mask operand of the GATHER operation.
123+
// Does not cost anything by itself, only has latency, matching that of the WriteLoad,
124+
defm : X86WriteRes<WriteVecMaskedGatherWriteback, [], 5, [], 0>;
117125

118126
// Arithmetic.
119127
defm : SBWriteResPair<WriteALU, [SBPort015], 1>;

0 commit comments

Comments
 (0)