Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/coreclr/jit/emit.h
Original file line number Diff line number Diff line change
Expand Up @@ -2088,6 +2088,7 @@ class emitter
#define PERFSCORE_LATENCY_14C 14.0f
#define PERFSCORE_LATENCY_15C 15.0f
#define PERFSCORE_LATENCY_16C 16.0f
#define PERFSCORE_LATENCY_17C 17.0f
#define PERFSCORE_LATENCY_18C 18.0f
#define PERFSCORE_LATENCY_20C 20.0f
#define PERFSCORE_LATENCY_22C 22.0f
Expand Down
56 changes: 39 additions & 17 deletions src/coreclr/jit/emitxarch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20913,7 +20913,7 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins
{
// ins reg, mem
result.insThroughput = PERFSCORE_THROUGHPUT_2X;
result.insLatency += opSize == EA_32BYTE ? PERFSCORE_LATENCY_3C : PERFSCORE_LATENCY_2C;
result.insLatency += opSize == EA_16BYTE ? PERFSCORE_LATENCY_2C : PERFSCORE_LATENCY_3C;
}
else
{
Expand Down Expand Up @@ -20943,11 +20943,12 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins
break;
}

case INS_lddqu:
case INS_movntdqa:
{
assert(memAccessKind == PERFSCORE_MEMORY_READ);
result.insThroughput = PERFSCORE_THROUGHPUT_2X;
result.insLatency += opSize == EA_32BYTE ? PERFSCORE_LATENCY_3C : PERFSCORE_LATENCY_2C;
result.insLatency += opSize == EA_16BYTE ? PERFSCORE_LATENCY_2C : PERFSCORE_LATENCY_3C;
break;
}

Expand All @@ -20963,7 +20964,7 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins
else if (memAccessKind == PERFSCORE_MEMORY_READ)
{
result.insThroughput = PERFSCORE_THROUGHPUT_2X;
result.insLatency += opSize == EA_32BYTE ? PERFSCORE_LATENCY_3C : PERFSCORE_LATENCY_2C;
result.insLatency += (EA_SIZE_IN_BYTES(opSize) <= 16) ? PERFSCORE_LATENCY_2C : PERFSCORE_LATENCY_3C;
}
else
{
Expand All @@ -20973,13 +20974,6 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins
break;
}

case INS_lddqu:
{
result.insThroughput = PERFSCORE_THROUGHPUT_2X;
result.insLatency += opSize == EA_32BYTE ? PERFSCORE_LATENCY_3C : PERFSCORE_LATENCY_2C;
break;
}

case INS_vpmovdb:
case INS_vpmovdw:
case INS_vpmovqb:
Expand Down Expand Up @@ -21147,7 +21141,7 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins
}
else
{
result.insLatency += opSize == EA_32BYTE ? PERFSCORE_LATENCY_4C : PERFSCORE_LATENCY_2C;
result.insLatency += opSize == EA_16BYTE ? PERFSCORE_LATENCY_2C : PERFSCORE_LATENCY_4C;
result.insThroughput = PERFSCORE_THROUGHPUT_1C;
}
break;
Expand Down Expand Up @@ -21231,7 +21225,7 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins
case INS_pmovzxdq:
{
result.insThroughput = PERFSCORE_THROUGHPUT_1C;
result.insLatency += opSize == EA_32BYTE ? PERFSCORE_LATENCY_3C : PERFSCORE_LATENCY_1C;
result.insLatency += opSize == EA_16BYTE ? PERFSCORE_LATENCY_1C : PERFSCORE_LATENCY_3C;
break;
}

Expand Down Expand Up @@ -21259,7 +21253,7 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins
case INS_vcvtuqq2ps:
{
result.insThroughput = PERFSCORE_THROUGHPUT_1C;
result.insLatency += opSize == EA_32BYTE ? PERFSCORE_LATENCY_7C : PERFSCORE_LATENCY_5C;
result.insLatency += opSize == EA_16BYTE ? PERFSCORE_LATENCY_5C : PERFSCORE_LATENCY_7C;
break;
}

Expand Down Expand Up @@ -21349,8 +21343,22 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins
case INS_vpgatherdd:
case INS_vgatherdps:
{
result.insThroughput = PERFSCORE_THROUGHPUT_4C;
result.insLatency += opSize == EA_32BYTE ? PERFSCORE_LATENCY_13C : PERFSCORE_LATENCY_11C;
if (opSize == EA_16BYTE)
{
result.insThroughput = PERFSCORE_THROUGHPUT_2C;
result.insLatency += PERFSCORE_LATENCY_11C;
}
else if (opSize == EA_32BYTE)
{
result.insThroughput = PERFSCORE_THROUGHPUT_4C;
result.insLatency += PERFSCORE_LATENCY_13C;
}
else
{
assert(opSize == EA_64BYTE);
result.insThroughput = PERFSCORE_THROUGHPUT_8C;
result.insLatency += PERFSCORE_LATENCY_17C;
}
break;
}

Expand All @@ -21361,8 +21369,22 @@ emitter::insExecutionCharacteristics emitter::getInsExecutionCharacteristics(ins
case INS_vgatherqps:
case INS_vgatherqpd:
{
result.insThroughput = PERFSCORE_THROUGHPUT_4C;
result.insLatency += opSize == EA_32BYTE ? PERFSCORE_LATENCY_11C : PERFSCORE_LATENCY_9C;
if (opSize == EA_16BYTE)
{
result.insThroughput = PERFSCORE_THROUGHPUT_1C;
result.insLatency += PERFSCORE_LATENCY_9C;
}
else if (opSize == EA_32BYTE)
{
result.insThroughput = PERFSCORE_THROUGHPUT_2C;
result.insLatency += PERFSCORE_LATENCY_11C;
}
else
{
assert(opSize == EA_64BYTE);
result.insThroughput = PERFSCORE_THROUGHPUT_4C;
result.insLatency += PERFSCORE_LATENCY_13C;
}
break;
}

Expand Down
Loading