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, D)

Test 1: uops

Code:

  fcmp d0, d1
  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)031e3f51schedule 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
10041038804925100010001000800001019103810388643896100010002000103810381110011000007321622103310391039103910391039
1004103871549251000100010008000010191038103886438961000100020001038103811100110000277321622103310391039103910391039
10041038804925100010001000800001019103810388643896100010002000103810381110011000007321622103310391039103910391039
10041038704925100010001000800011019103810388643896100010002000103810381110011000007321622103310391039103910391039
10041038707025100010001000800001019103810388643896100010002000103810381110011000007321622103310391039103910391039
10041038804925100010001000800011019103810388643896100010002000103810381110011000007321622103310391039103910391039
10041038804925100010001000800011019103810388643896100010002000103810381110011000007321622103310391039103910391039
10041038704925100010001000800011019103810388643896100010002000103810381110011000007321622103310391039103910391039
10041038804925100010001000800011019103810388643896100010002000103810381110011000037321622103310391039103910391039
10041038704925100010001000800011019103810388643896100010002000103810381110011000007321622103310391039103910391039

Test 2: Latency 3->1

Chain cycles: 2

Code:

  fcmp d0, d1
  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)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)696d6emap 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
2020440037300000613982225201001002000010020000500285388040018400374003737316337495201002002000020050000400374003711202011009910010020000101000013102162239909100001004003840038400384003840038
2020440037300000613982225201001002000010020000500285388040018400374003737316337495201002002000020050000400374003711202011009910010020000101000013102162239909100001004003840038400384003840038
2020440037300000613982225201001002000010020000500285388040018400374003737316337495201002002000020050000400374003711202011009910010020000101000013102162239909100001004003840038400384003840038
2020440037300000613982225201001002000010020000500285388040018400374003737316337495201002002000020050000400374003711202011009910010020000101000013102162239909100001004003840038400384003840038
2020440037300000613982225201001002000010020000500285388040018400374003737316337495201002002000020050000400374003711202011009910010020000101000013102162239909100001004003840038400384003840038
20204400373000007263982225201001002000010020000500285388040018400374003737316337495201002002000020050000400374003711202011009910010020000101000013102162239909100001004003840038400384003840038
2020440037300000613982225201001002000010020000500285388040018400374003737316337495201002002000020050000400374003711202011009910010020000101000013102162239909100001004003840038400384003840038
2020440037300000613982225201001002000010020000500285388040018400374003737316337495201002002000020050000400374003711202011009910010020000101000013102162239909100001004003840038400384003840038
2020440037300000613982225201001002000010020000500285388040018400374003737316337495201002002000020050000400374003711202011009910010020000101000013102162239909100001004003840038400384003840038
2020440037300000613982225201001002000010020000500285388040018400374003737316337495201002002000020050000400374003711202011009910010020000101000013102162239909100001004003840038400384003840038

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)0318191e3f4e51schedule 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)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)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
2002440037300000613982225200101020000102000050285388004001840037400373733803375172001020200002050000400374003711200211091010200001001021270216113991010000104003840038400384003840038
2002440037300000613982225200101020000102000050285388004001840037400373733803375172001020200002050000400374003711200211091010200001001001270116113991010000104003840038400384003840038
2002440037299000613982225200101020000102000050285388014001840037400373733803375172001020200002050000400374003711200211091010200001001001270116113991010000104003840038400384003840038
2002440037300000613982225200101020000102000050285388014001840037400373733803375172001020200002050000400374003711200211091010200001001001270116113991010000104003840038400384003840038
2002440037300000613982225200101020000102000050285388014001840037400373733803375172001020200002050000400374003711200211091010200001001001270116113991010000104003840038400384003840038
2002440037300000613982225200101020000102000050285388014001840037400373733803375172001020200002050000400374003711200211091010200001001001270116113991010000104003840038400384003840038
2002440037300000613982225200101020000102000050285388014001840037400373733803375172001020200002050000400374003711200211091010200001001001270116113991010000104003840038400384003840038
2002440037300000613982225200101020000102000050285388004001840037400373733803375172001020200002050000400374003711200211091010200001001001270116113991010000104003840038400384003840038
2002440037299000613982225200101020000102000050285388004001840070400373733803375172001020200002050000400374003711200211091010200001001001270116113991010000104003840038400384003840038
2002440037300000613982225200101020000102000050285388004001840037400373733803375172001020200002050000400374003711200211091010200001001001270116113991010000104003840038400714003840038

Test 3: Latency 3->2

Chain cycles: 2

Code:

  fcmp d0, d1
  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)031e3f4e51schedule 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)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 tlb access (a0)l1d cache writeback (a8)accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
2020440037300025039822252010010020000100200005002853880140018400374008537327033749520100200200002005000040037400371120201100991001002000010100000013101161139909100001004003840038400384003840038
202044003730006139822252010010020000100200005002853880140018400374003737316033749520100200200002005000040037400371120201100991001002000010100000013101161139909100001004003840038400384003840038
202044003729906139822252010010020000100200005002853880040018400374003737316033749520100200200002005000040037400371120201100991001002000010100000013101161139909100001004003840038400384003840038
202044003730006139822252010010020000100200005002853880140018400374003737316033749520100200200002005000040037400371120201100991001002000010100000013101161139909100001004003840038400384003840038
2020440037300053639822252010010020000100200005002853880140018400374003737316033749520100200200002005000040037400371120201100991001002000010100000013101161139909100001004003840038400384003840038
2020440037300017039822252010010020000100200005002853880140018400374003737316033749520100200200002005000040071400371120201100991001002000010100000013101161139909100001004003840038400384003840038
202044003730006139822252010010020000100200005002853880140018400374003737316033749520100200200002005000040037400371120201100991001002000010100000013101161139909100001004003840038400384003840038
202044003730006139822252010010020000100200005002853880140018400374003737316033749520100200200002005000040037400371120201100991001002000010100000013101161139909100001004003840038400384003840038
202044003729906139822252010010020000100200005002853880140018400374003737316033749520100200200002005000040037400371120201100991001002000010100000013101161139909100001004003840038400384003840038
2020440037300053639822252010010020000100200005002853880140018400374003737316033749520100200200002005000040037400371120201100991001002000010100000013101161139909100001004003840038400384003840038

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03181e3f4e51schedule 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)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
20024400373000061398222520010102000010200005028538801400184003740037373383375172001020204572050695400854022751200211091010200001001027310012706161139910010000104003840038400384003840038
20024400373000061398222520010102000010200805028538801400184003740037373383375172001020200002050000400374003711200211091010200001001000000012701161139910010000104003840038400384003840038
20024400373000061398222520010102000010200005028538801400184003740037373383375172001020200002050000400374003711200211091010200001001000009012701161139910010000104003840038400384003840038
20024400373001061398222520010102000010200005028538801400184003740037373383375172001020200002050000400374003711200211091010200001001000000012701161139910010000104003840038400384003840038
20024400372990061398222520010102000010200005028543681400184003740037373383375172001020200002050000400374003711200211091010200001001002000012701161139910010000104003840038400384003840038
20024400373000061398222520010102000010200005028538800400184003740037373383375172001020200002050000400374003711200211091010200001001000000012701161139977010000104003840075400384003840038
2002440037300004780398222520010102000010200005028538800400184003740037373383375172001020200002050000400374003711200211091010200001001000000012701161239910010000104003840038400384003840038
200244003730002161398222520023102000010200005028538800400184003740037373383375172001020200002050000400374003711200211091010200001001000000012701161139910010000104003840038400384003840038
20024400373000061398222520010102000010200005028538801400184003740037373383375172001020200002050000400374003711200211091010200001001000000012701161239910010000104003840038400384003840038
20024400372990066398222520010102000010200005028538800400184003740037373383375172001020200002050000400374003711200211091010200001001000000012701161139910010000104003840038400384003840038

Test 4: throughput

Count: 8

Code:

  fcmp d0, d1
  fcmp d0, d1
  fcmp d0, d1
  fcmp d0, d1
  fcmp d0, d1
  fcmp d0, d1
  fcmp d0, d1
  fcmp d0, d1
  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)l2 tlb miss data (0b)18191e1f3f51schedule 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)l1d tlb miss (a1)l1d cache writeback (a8)a9acc2branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int retires (ef)f5f6f7f8fd
80204800386000000001122580100100800001008000050064000018001980038800386999436999680100200800002001600008003880038118020110099100100800001000000000511032511800351008003980039800398003980039
80204800386000000009232580100100800001008000050064000008001980038800386996436999680100200800002001600008003880038418020110099100100800001000000000511011611801811008003980039800398003980232
8020480038600000000492580100100800001008000054564000008001980038800386996436999680100200800002001600008003880038118020110099100100800001000000000511011611800351008003980039800398003980039
8020480038620000000499980100100800001008000050064000008001980038800386996436999680100200800002001600008003880038118020110099100100800001000000000511011611800351008003980039801848003980039
8020480038600000000492580100100800001008000050064000008001980038800386996436999680100200800002001600008003880038118020110099100100800001000000300511011611800351008003980039800398003980039
8020480038600000000492580100100800001008000050064000008001980038800386996436999680219200800002001600008003880038118020110099100100800001000000000511011611800351008003980039800398003980039
80204800386000000007142580100100800001008000050064000008001980038800386996436999680100200800002001600008003880038118020110099100100800001000000000511011611800351008003980039800398003980039
8020480038600000000492580100100800001008000050064000008001980038800386996436999680100200800002001600008003880038118020110099100100800001000010205600511011611800351008003980039800398003980039
80204800386001000001772580100100800001008000050064000008001980038800386996436999680100200800002001600668003880038118020110099100100800001001000000511011611800351008003980039800398003980039
802048003859900001680492580100100800001008000050064000008001980038800386996436999680100200800002001600008003880038118020110099100100800001000000000511011611800351008003980039800398003980039

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l2 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)5f60696b6d6emap 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)ld unit uop (a6)l1d cache writeback (a8)acbranch mispred nonspec (cb)cfd0l1i cache miss demand (d3)d5map dispatch bubble (d6)d9daddfetch restart (de)e0ea? int retires (ef)f5f6f7f8fd
8002480038600000492580010108000010800005064000000800190800388003869986370018800102080000201600008003880038118002110910108000010000005020001160011800330108003980039800398003980039
8002480038599000492580010108000010800005064000000800190800388003869986370018800102080000201600008003880038118002110910108000010000005020001160011800330108003980039800398003980039
8002480072600000492580010108000010800005064000000800190800388003869986370018800102080000201600008003880038118002110910108000010000005020001160011800330108003980039800398003980039
8002480038600000492580010108000010800005064000001800190800388003869986370018800102080000201600008003880038118002110910108000010000005020001160011800330108003980039800398003980039
8002480038599000492580010108000010800005064000000800190800388003869986370018800102080000201600008003880038118002110910108000010000005020001160011800330108003980039800398003980039
8002480038599000492580010108000010800005064000000800190800388003869986370018800102080000201600008003880038118002110910108000010000005020001160011800330108003980039800398003980039
8002480038599000492580010108000010800005064000011800190800388003869986370018800102080000201600008003880038118002110910108000010000005020001160011800330108003980039800398003980039
8002480038599000492580010108000010800005064000000800190800388003869986370018800102080000201600008003880038118002110910108000010000005020001160011800330108003980039800398003980039
8002480038599000492580010108000010800005064000000800190800388003869986370018800102080000201600008003880038118002110910108000010000005020001160011800330108003980039800398003980039
80025800386000007142580010108000010800005064000000800190800388003869986370018800102080000201600008003880038118002110910108000010000005020001160011800330108003980039800398003980039