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

Test 1: uops

Code:

  fcmp h0, h1
  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)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0f5f6f7f8fd
100410387049251000100010008000010191038103886438961000100020001038103811100110001007321622103310391039103910391039
100410387049251000100010008000110191038103886438961000100020001038103811100110000007321622103310391039103910391039
100410388049251000100010008000110191038103886438961000100020001038103811100110000007321622103310391039103910391039
100410387049251000100010008000010191038103886438961000100020001038103811100110000007321622103310391039103910391039
100410388049251000100010008000010191038103886438961000100020001038103811100110000107321622103310391039103910391039
100410387049251000100010008000110191038103886438961000100020001038103811100110000007321622103310391039103910391039
100410387049251000100010008000010191038103886438961000100020001038103811100110002007321622103310391039103910391039
100410388049251000100010008000110191038103886438961000100020001038103811100110000007321622103310391039103910391039
10041038801102510001000100080001101910381038864389610001000200010381038111001100000967321622103310391039103910391039
100410388049251000100010008000110191038103886438961000100020001038103811100110001007321622103310391039103910391039

Test 2: Latency 3->1

Chain cycles: 2

Code:

  fcmp h0, h1
  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)03181e1f3f4e51schedule 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)9fld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
202044003730000061398222520100100200001002000050028543714001840037400373731633749520100200200002005000040037400371120201100991001002000010100001000131012511399460100001004003840038400384003840038
202044003730000061398222520100100200001002000051528538804001840037400373731633749520100200200002005000040037400371120201100991001002000010100000060131011611399090100001004003840038400384003840038
202044003730000061398222520100100200001002000050028538804001840037400373731633749520100200200002005000040037400371120201100991001002000010100000030131011611399090100001004003840038400384003840038
202044003730000061398222520100100200001002000050028538804001840037400373731633749520100200200002005000040037400371120201100991001002000010100000030131011611399090100001004003840038400384003840038
202044003730000061398222520100100200001002000050028538804001840037400373731633749520100200200002005000040037400371120201100991001002000010100000060131011611399090100001004003840085400384003840038
2020440037300000252398222520100100200001002000050028538804001840037400373731633749520100200200002005000040037400371120201100991001002000010100000050780131011611399090100001004003840038400384003840038
202044003730000061398222520100100200001002000050028538804001840037400373731633749520100200200002005000040037400371120201100991001002000010100000030131011611399090100001004003840038400384003840038
2020440037300000613982225201001002000010020000500285388040018400374003737316337495201002002009420050000400374003711202011009910010020000101000031000131011611399090100001004003840038400384003840038
202044003729900061398042520100100200001002000050028538804001840037400373731633749520100200200002005000040037400371120201100991001002000010100000060131011611399090100001004003840038400384003840038
2020440037300030061398222520100100200001002007850028543714001840037400373731633749520100200200002005000040037400371120201100991001002000010100001000131011611399090100001004003840038400384008640038

1000 unrolls and 10 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)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)9fld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc2cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
20024400373000613982225200101020000102000050285388004001840037400373733833751720010202000020500004003740037112002110910102000010010005000012704162339910010000104003840038400384003840038
200244003730006139822252001010200001020000502853880040018400374007437338337517200102020000205000040037400371120021109101020000100100045090012702162239910110000104003840038400384003840038
20024400373000613982225200101020000102000050285388004001840037400373733833751720010202000020500004003740037112002110910102000010010000000012702162239910010000104003840038400384003840038
20024400373003613982225200101020000102000050285388004001840037400373733833751720010202000020500004003740037112002110910102000010010000000012702162239910010000104003840038400384003840038
20024400373000613982225200101020000102000050285388004001840037400373733833751720010202000020500004003740037112002110910102000010010000000012702162239910010000104003840038400384003840038
200244003730006139822252001010200001020000502853880040018400374003737338163751720010202000020500004003740037112002110910102000010010000000012702162239910010000104003840038400384003840038
20024400373000613982225200101020000102000050285388004001840037400373733833751720010202000020500004003740037112002110910102000010010000000012702162239910010000104003840038400384003840038
20024400373000613982225200101020000102000050285388004001840037400373733833751720010202000020500004003740037112002110910102000010010000000012702162239910010000104003840038400384003840038
20024400373000613982225200101020000102000050285388014001840037400373733833751720010202000020500004003740037112002110910102000010010000000012702162239910010000104003840038400384003840038
20024400373000613982225200101020000102000050285388004005440037400373733833751720010202000020500004003740037112002110910102000010010000000012702162239910010000104003840038400384003840038

Test 3: Latency 3->2

Chain cycles: 2

Code:

  fcmp h0, h1
  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)03mmu table walk data (08)1e3f4e51schedule 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)acbranch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
20204400373000061139822252010010020000100200005002853880140018400374003737316033749520100200200002005000040037400371120201100991001002000010100000131011611399090100001004003840038400384003840038
202044003730000132939822252010010020000100200005002853880040018400374003737316033749520100200200002005000040037400372120201100991001002000010100100131011611399090100001004003840038400384003840038
20204400373000061398222520100100200001002000050028538800400184003740037373160337495201002002000020050000400374003711202011009910010020000101000001310116113990924100001004003840038400384003840038
2020440037300006139822252010010020000100200005002853880040018400374003737316033749520100200200002005000040037400371120201100991001002000010100030131011611399090100001004003840038400384003840038
2020440037299006139822252010010020000100200005002853880040018400374003737316033749520100200200002005000040037400371120201100991001002000010100000131011611399090100001004003840038400384003840038
2020440037299006139822252010010020000100200005002853880040018400374003737316033749520100200200002005000040037400371120201100991001002000010100000131011611399090100001004003840038400384003840038
2020440037300006139822252010010020000100200005002853880040018400374003737316033749520100200200002005000040037400371120201100991001002000010100000131011611399090100001004003840038400384003840038
2020440037300006139822252010010020000100200005002853880140018400374003737316033749520100200200002005000040037400371120201100991001002000010100000131011611399090100001004003840038400384003840038
2020440037300006139822252010010020000100200005002853880040018400374003737316033749520100200200002005000040037400371120201100991001002000010100030131011611399090100001004003840038400384003840038
2020440037300006139822252010010020000100200005002853880140018400374003737316033749520100200200002005000040037400371120201100991001002000010100000131011611399090100001004003840038400384003840038

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)1e3f4e51schedule 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 cache writeback (a8)acbranch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
200244003730200629398222520010102000010200005028538801400184003740037373383375172001020200002050000400374003711200211091010200001001000001270216113991010000104003840038400384003840038
2002440037300001014398222520010102000010200005028538800400184003740037373383375172001020200002050000400374003711200211091010200001001001301270116213991010000104003840038400384003840038
2002440037300001806398222520010102000010200005028538801400184003740037373383375172017420200002050000400374003721200211091010200001001041301286216233991010000104003840038400384003840038
2002440037300001345398222520010102000010200005028538801400184003740037373383375172001020200002050000400374003711200211091010200001001001001286216123991010000104003840038400384003840038
2002440037300001269398222520010102000010200005028538801400184003740037373383375172001020201082050000400374003711200211091010200001001000001270116113991010000104003840038400384003840038
2002440037300142332398222520010102000010200005028538800400184003740037373383375172001020200002050000400374003711200211091010200001001000001270116113991010000104003840038400384003840038
200244003730000170398222520010102000010200005028538800400184003740037373383375172001020200002050000400374003711200211091010200001001000001270116113991010000104003840038400384003840038
200244003730000107398222520010102000010200005028538801400184003740037373383375172001020200002050000400374003711200211091010200001001000001270116113991010000104003840038400384003840038
20024400373000084398222520010102000010200005028538800400184003740037373383375172001020200002050000400374003711200211091010200001001000001270116113991010000104003840038400384003840038
2002440037299001085398222520010102000010200005028538800400184003740037373383375172001020200002050000400374003711200211091010200001001000001270216113991010000104003840038400384003840038

Test 4: throughput

Count: 8

Code:

  fcmp h0, h1
  fcmp h0, h1
  fcmp h0, h1
  fcmp h0, h1
  fcmp h0, h1
  fcmp h0, h1
  fcmp h0, h1
  fcmp h0, h1
  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)031e1f3f51schedule 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)a9acbranch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int retires (ef)f5f6f7f8fd
802048003859900492580100100800001008000050064000008001980038800386996436999680100200800002001600008003880038118020110099100100800001000000511021611800351008003980039800398003980039
802048003859900722580100100800001008002450064000008001980038800386996436999680100200800002001600008003880038118020110099100100800001000000511011611800351008003980039800398003980039
802048003859900492580100100800001008000050064000008001980038800386996436999680100200800002001600008003880038118020110099100100800001000001511011611800351008003980039800398003980039
802048003860000702580100100800001008000050064000008001980038800386996436999680100200800002001600008003880038118020110099100100800001000000511011611800351008003980039800398003980039
802048003859900492580100100800001008000050064000008001980038800386996436999680100200800002001600008003880038118020110099100100800001000000511011611800351008003980039800398003980039
802048003860046829624625801001008000010080000500640000080019800388019770043369996801002008000020016000080038800381180201100991001008000010010150511013211800351008003980039800398003980039
802048003859900492580100100800001008000050064000008001980038800386996436999680100200800002001600008003880038118020110099100100800001000000513011611800351008003980039800398003980039
802048003859900492580100100800001008000050064000008001980038800386996436999680100200800002001600008003880038118020110099100100800001000000511011611800351008003980039800738003980039
802048003860000492580100100800001008000050064000008001980038800386996436999680100200800002001600008003880038118020110099100100800001000000511011611800351008003980039800398003980039
802048003859900772580100100800001008000050064000008001980038800386996436999680100200800002001600008003880038118020110099100100800001000000511011611800351008003980039800398003980039

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3f51schedule 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)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)9fld unit uop (a6)l1d cache writeback (a8)acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)ec? int retires (ef)f5f6f7f8fd
8002480038600052425800101080000108000050640000018001980038800386998637001880010208000020160000800388003811800211091010800001000000050209416338003300108003980039800398003980039
800248003859904925800101080000108000050640000018001980038800386998637001880010208000020160000800388003811800211091010800001000000050200316348003300108003980039800398003980087
8002480038600073525800101080000108000050640000008001980038800386998637001880010208000020160000800388003811800211091010800001000000050200416448003300108003980039800398003980039
8002480038600071425800101080000108000050640000008001980038800386998637001880010208000020160000800388003811800211091010800001000000050200416348003300108003980039800398003980039
8002480038600071425800101080000108000050640000018001980038800386998637001880010208000020160000800388003811800211091010800001000000050200416448003300108003980039800398003980039
8002480038599071425800101080000108000050640000008001980038800386998637001880010208000020160000800388003811800211091010800001000000050203416448003300108003980039800398003980039
8002480038600071425800101080000108000050640000008001980038800386998637001880010208000020160000800388003811800211091010800001000000050400416338003300108003980039800398003980039
8002480072599071425800101080000108000050640000018001980038800386998637001880010208000020160000800388003811800211091010800001001000050200516448003300108003980183800398003980039
8002480038599127025800101080000108000050640000018001980038800386998637001880010208000020160000800388003811800211091010800001000320050343532558003320108008880039800398013480134
80024800385990492580010108000010800005064000001800198003880038699863700188001020800002016000080038800381180021109101080000102154400050203516558003300108003980039800398003980039