Apple Microarchitecture Research by Dougall Johnson

M1/A14 P-core (Firestorm): Overview | Base Instructions | SIMD and FP Instructions
M1/A14 E-core (Icestorm):  Overview | Base Instructions | SIMD and FP Instructions

FCMP (scalar, S)

Test 1: uops

Code:

  fcmp s0, s1
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 0.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 1.000

retire uop (01)cycle (02)033a3f51schedule uop (52)schedule simd uop (54)dispatch simd uop (57)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map simd uop (7e)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst simd alu (9a)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0f5f6f7f8fd
10041038804925100010001000800011019103810388643896100010002000103810381110011000007331622103310391039103910391039
10041038804925100010001000800011019103810388643896100010002000103810381110011000007321622103310391039103910391039
10041038804925100010001000800011019103810388643896100010002000103810381110011000007321622103310391039103910391039
10041038804925100010001000800011019103810388643896100010002000103810381110011000007321622103310391039103910391039
10041038704925100010001000800011019103810388643896100010002000103810381110011000007321622103310391039103910391039
10041038704925100010001000800011019103810388643896100010002000103810381110011000007321622103310391039103910391039
10041038709325100010001000800011019103810388643896100010002000103810381110011000007321622103310391039103910391039
10041038804925100010001000800011019103810388643896100010002000103810381110011000007321622103310391039103910391039
10041038804925100010001000800001019103810388643896100010002000103810381110011000037321622103310391039103910391039
10041038804925100010001000800001019103810388643896100010002000103810381110011000007321622103310391039103910391039

Test 2: Latency 3->1

Chain cycles: 2

Code:

  fcmp s0, s1
  fcsel d0, d2, d3, eq
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code, minus 2 chain cycles): 2.0037

retire uop (01)cycle (02)03191e3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696b6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d cache writeback (a8)a9acbranch cond mispred nonspec (c5)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
20204400373000061398222520100100200001002000050028538801400180400374003737316337495201002002000020050000400374003711202011009910010020000101000000013101161139909100001004003840038400384003840038
20204400372990061398224020100100200001002000050028538800400180400374003737316337495201002002000020050000400374003711202011009910010020000101000000013101161139909100001004003840038400384003840038
20204400373000061398222520100100200001002000050028538801400180400374003737316337495201002002000020050000400374003711202011009910010020000101000000013101161139909100001004003840038400384003840038
2020440037300001313398222520100100200001002000050028538801400180400374003737316337495201002002000020050000400374003711202011009910010020000101000000013102161139909100001004003840038400384003840038
202044003730001261398222520100100200001002000050028538801400180400374003737325337495201002002000020050225400374003711202011009910010020000101001200013101161139909100001004003840038400384003840038
202044003729900437398222520100100200001002000050028538801400180400374003737316337495201002002000020050000400374003711202011009910010020000101000000013101161139909100001004003840038400384003840038
20204400372990061398222520100100200001002000050028538801400180400374003737316337495201002002000020050000400374003711202011009910010020000101000000013101161139909100001004003840086400854003840038
202044003730010505398042520100100200001002000050028538801400180400374003737316337495201002002000020050000400374003711202011009910010020000101000000013101161139976100001004003840038400384003840038
20204400373000061398222520100100200081002000050028538801400180400374003737316337495201002002000020050000401794003711202011009910010020000101000000013101161139909100001004003840038400384003840038
20204400372990061397682520144125200001002000050028538801400180400374017837316337521201002002000020050000400374003711202011009910010020000101000000013101161139909100001004003840038400384003840038

1000 unrolls and 10 iterations

Result (median cycles for code, minus 2 chain cycles): 2.0037

retire uop (01)cycle (02)0318191e1f3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d cache writeback (a8)acbranch cond mispred nonspec (c5)cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
20024400372990000613982225200101020000102000050285388014001840037400373733833751720010202000020500004003740037112002110910102000010010000127001161139910010000104003840038400384003840038
20024400373000000613982225200101020000102000050285388004001840037400373733833751720010202000020500004003740037112002110910102000010010000127001161139910010000104003840038400384003840038
20024400373000000613982225200101020000102000050285388004001840037400373733833751720010202000020500004003740037112002110910102000010010000127001161139910010000104003840038400384003840038
20024400373000000613982225200101020000102000050285388004001840037400373733833751720010202000020500004003740037112002110910102000010010000127001161139910010000104003840038400384003840038
200244003730000007263982225200101020000102000050285388004001840037400373733833751720010202000020500004003740037112002110910102000010010000127001161139910010000104003840038400384003840038
20024400373000000613982225200101020000102000050285388004001840037400373733833751720010202000020500004003740037112002110910102000010010000127001161039910010000104003840038400384003840038
20024400372990000613982225200101020000102000050285388014001840037400373733833751720010202000020500004003740037112002110910102000010010100127001161139910010000104003840038400384003840038
20024400373000000613982225200101020000102000050285388014001840037400373733833751720010202000020500004003740037112002110910102000010010000127001161139910010000104003840038400384003840038
20024400373000000613982225200101020000102000050285388014001840037400373733833751720010202000020500004003740037112002110910102000010010000127001161139910010000104003840038400384003840038
20024400373000000613982225200101020000102000050285388004001840037400373733833751720010202000020500004003740037112002110910102000010010000127001161139910010000104003840038400384003840038

Test 3: Latency 3->2

Chain cycles: 2

Code:

  fcmp s0, s1
  fcsel d1, d2, d3, eq
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code, minus 2 chain cycles): 2.0037

retire uop (01)cycle (02)03191e1f3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb miss (a1)l1d cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
20204400372990189886139822252010010020000100200005002853880140018400374022937316337495201002002000020050000400374003711202011009910010020000101004000131021611399090100001004003840038400384003840038
20204400373000006139750252010010020000100200005002853880140018400374003737316337495204402002000020050000400374003711202011009910010020000101000002131011611399090100001004003840038400384003840038
20204400373000006139822252010010020024100200005002853880140018400374003737316337495201002002000020050000400374003721202011009910010020000101000000131011611399090100001004003840038400384003840038
202044003730000029439822252010010020000100200005002853880140018401784003737316337495201002002000020050000400374003711202011009910010020000101000000131011611399090100001004003840038400384003840038
20204400373000006139822252010010020000100200005002853880140018400374003737316337495201002002000020050000400374003711202011009910010020000101000000131011611399820100001004003840038400384003840038
202044003729900072639822252017410020000100200005002853880140018400844003737316337495201002002000020050000400374003711202011009910010020000101000302131011611399090100001004003840038400384003840038
202044003729900010339822252010010020000100200005002853880140162400374003737316337495201002002000020050000400374003711202011009910010020000101000090131011611399090100001004003840038400384003840038
20204400373000006139822252010010420000121200005002853880040018400374003737316337495201002002000020050000400374003711202011009910010020000101000000131011611399090100001004003840038400384003840038
20204400373000006139822252016110020000100200005002853880040018400374003737316337495202642002000020050000400374003711202011009910010020000101000000131011611399090100001004003840038400384003840038
20204400373000006139822252010010020000100200005002853880140018400374022637316337495201002002000020050000400374003711202011009910010020000101000000131011611399090100001004007240038400384003840038

1000 unrolls and 10 iterations

Result (median cycles for code, minus 2 chain cycles): 2.0037

retire uop (01)cycle (02)031e1f3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb access (a0)st unit uop (a7)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
2002440037300006139822252001010200001020000502853880140018400374003737338337517200102020000205000040037400371120021109101020000100100003612701163339910010000104003840038400384003840038
2002440037300006139822252001010200001020000502853880140018400374003737338337517200102020000205000040037400371120021109101020000100100002112704163439910010000104003840038400384003840038
200244003729900613982225200101020000102000050285388004001840037400373733833751720010202000020500004003740037112002110910102000010010000136812702162439910010000104003840038400384003840038
2002440037299006139822252001010200001020000502853880140018400374003737338337517200102020000205000040037400371120021109101020000100100004212701162139910010000104003840038400384003840038
2002440037300006139822252001010200001020000502853880040018400374003737338337517200102020000205000040037400371120021109101020000100100002412704163939910010000104003840038400384003840038
2002440037300006139822252001010200001020000502853880040018400374003737338337517200102020000205000040037400371120021109101020000100100001812702163139910010000104003840038400384003840038
2002440037300006139822252001010200001020000502853880040018400374003737338337517200102020000205000040037400371120021109101020000100100003312701162239910010000104003840038400384003840038
20024400373000082398222520010102000010200005028538800400184003740037373383375172001020200002050000400374003711200211091010200001001000013212704162339910010000104003840038400384003840038
2002440037300006139822252001010200001020000502853880040018400374003737338337517200102020000205000040037400371120021109101020000100100009612702164339910010000104003840038400384003840038
2002440037300006139822252001010200001020000502853880140018400374003737338337517200102020000205000040037400371120021109101020000100100003312702163339910010000104003840038400384003840038

Test 4: throughput

Count: 8

Code:

  fcmp s0, s1
  fcmp s0, s1
  fcmp s0, s1
  fcmp s0, s1
  fcmp s0, s1
  fcmp s0, s1
  fcmp s0, s1
  fcmp s0, s1
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code divided by count): 1.0005

retire uop (01)cycle (02)03mmu table walk data (08)09l2 tlb miss data (0b)18191e1f3a3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696b6d6emap stall dispatch (70)flags prf full (73)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d cache writeback (a8)acc2branch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802048003860000000000492580100100800001008000050064000008001908003880038699640369996801002008000020016000080038800381180201100991001008000010000005110216118003501008003980039800398003980039
802048003860000000000492580100100800001008000050064000018001908003880038699640369996801002008000020016000080038800381180201100991001008000010000005110116118003501008003980039800398003980039
80204800386000000000049258010010080000100800005006400001800190800388003869964036999680100200800002001600008003880038118020110099100100800001000117005110116118003501008003980039800398003980039
802048003859900000000492580100100800001008000050064000018001908003880038699640369996801002008000020016000080038800381180201100991001008000010000005110116118003501008003980039800398003980039
802048003859900000000492580100100800001008000050064000018001908003880038699640369996801002008004820016000080038800381180201100991001008000010000005110116118003501008003980039800398003980039
802048003859900000000492580100100800001008000050064000018001908003880038699640369996801002008000020016000080038800381180201100991001008000010000005110116118003501008003980039800398003980039
802048003859900000000492580100100800001008000050064000018001908003880038699640369996801002008000020016000080038800381180201100991001008000010000005110116118003501008003980039800398003980039
802048003859900000000492580100100800001008000050064000018001908003880038699640369996801002008000020016000080038800381180201100991001008000010000005110116118003501008003980039800398003980039
802048003859900000000492580100100800001008000050064000018001908003880038699647369996801002008000020016000080038800381180201100991001008000010000005110116118003501008003980039800398008880039
802048003859900000000492580100100800001008000050064000018001908003880038699640369996801002008000020016000080038800381180201100991001008000010000005110116118006901008003980039800398003980039

1000 unrolls and 10 iterations

Result (median cycles for code divided by count): 1.0005

retire uop (01)cycle (02)03mmu table walk instruction (07)l2 tlb miss data (0b)1e1f3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)5f60696d6emap stall dispatch (70)flags prf full (73)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d cache writeback (a8)accfl1i cache miss demand (d3)d5map dispatch bubble (d6)dadbddfetch restart (de)e0eb? int retires (ef)f5f6f7f8fd
8002480038599000049258001010800001080000506400000180019800388003869986037001880010208000020160000800388003811800211091010800001000502008160066800330108003980039800398003980039
80024800386000012049258001010800001080000506400000180019800388003869986037001880010208000020160000800388003811800211091010800001000502006160065800330108003980039800398003980039
80024800385990000492580010108000010800005064000000800198003880038699860370018800102080000201600008003880038118002110910108000010005020013160077800330108003980039800398003980039
8002480038600000049258001012800001080000506400000180019800388003869986037001880010208000020160000800388003811800211091010800001000502006160077800330108003980039800398003980039
8002480038600000049258001010800001080000506400000180019800388003869986037001880010208000020160000800388003811800211091010800001000502006320065800330108003980039800398003980039
8002480038600000049258001010800001080000506400000080019800388003869986037001880010208000020160000800388003811800211091010800001000502007160077800330108003980039800398003980039
8002480038599000049258001010800001080000506400000080019800388003869986037001880010208000020160000800388003811800211091010800001000502006160056800330108003980039800398003980039
8002480038600000049258001010800001080000506400000180019800388003869986037001880010208000020160000800388003811800211091010800001000502018160077800330108003980039800398003980039
8002480038600000049258001010800001080000506400000080019800388003869986037001880010208000020160000800388003811800211091010800001000502006160077800330108003980039800398003980039
80024800385990000492580010108000010800005064000000800198003880038699860370018800102080000201600008003880038118002110910108000010005020081600778003314108003980039800398003980039