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

CMP (immediate, 64-bit)

Test 1: uops

Code:

  cmp x0, #3
  mov x0, 1

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 1.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)031e3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)606d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst int alu (97)ld unit uop (a6)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
1004369303625100010001000500013693692063225100010001000369661110011000000073318113661000370370370370370
1004369263625100010001000500013693692063225100010001000369661110011000000073118113661000370370370370370
1004369203625100010001000500013693692063225100010001000369661110011000000073118113661000370370370370370
1004369303625100010001000500013693692063225100010001000369661110011000000073118113661000370370370370370
1004369203625100010001000500013693692063225100010001000369661110011000000673118113661000370370370370370
1004369303625100010001000500013693692063225100010001000369661110011000000073118113661000370370370370370
1004369303625100010001000500013693692063225100010001000369661110011000000073118113661000370370370370370
1004369303625100010001000500013693692063225100010001000369661110011000000073118113661000370370370370370
1004369203625100010001000500013693692063225100010001000369661110011000000073118113661000370370370370370
1004369203625100010001000500013693692063225100010001000369661110011000000073118113661000370370370370370

Test 2: Latency 2->1

Chain cycles: 1

Code:

  cmp x0, #3
  cset x0, cc
  mov x0, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code, minus 1 chain cycle): 1.0035

retire uop (01)cycle (02)031e3a3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb miss (a1)l1d cache writeback (a8)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20204200351500061199302520100201002011212972330491695520035200351742561748720112202242022420035104112020110099100201001010000001111318116112001120000101002003620036200362003620036
20204200351490061199302520100201002011212972330491695520035200351742561748720112202242022420035104112020110099100201001010000001111318116112001120000101002003620036200362003620036
20204200351500061199302520100201002011212972330491695520035200351742561748720112202242022420035104112020110099100201001010000001111318116112001120000101002003620036200362003620036
20204200351500061199302520100201002011212972331491695520035200351742561748720112202242022420035104112020110099100201001010000001111318116112001120000101002003620036200362003620036
20204200351500061199302520100201002011212972331491695520035200351742561748720112202242022420035104112020110099100201001010000001111318116112001120000101002003620036200362003620036
20204200351500061199302520100201002011212972331491695520035200351742561748720112202242022420035104112020110099100201001010000001111318116112001120000101002003620036200362003620036
2020420035150001008199302520100201002011212972330491695520035200351742561748720112202242022420035104112020110099100201001010000001111318116112001120000101002003620036200362003620036
20204200351500061199302520100201002011212972330491695520035200351742561748720112202242022420035104112020110099100201001010000001111318116112001120000101002003620036200362003620036
20204200351500061199302520100201002011212972330491695520035200351745761748720112202242022420035104112020110099100201001010000001111318116122001120000101002003620036200362003620036
20204200351500061199302520100201002011212972330491695520035200351742561748720112202242022420035104112020110099100201001010000001111318116112001120000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code, minus 1 chain cycle): 1.0035

retire uop (01)cycle (02)03l2 tlb miss data (0b)191e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)6061696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb access (a0)l1d cache writeback (a8)accfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)eb? int retires (ef)f5f6f7f8fd
2002420035150000251199182520010200102001012972471049169552003520035174283175042001020020200202003510411200211091020010100100001270003274519995200002100102003620036200362003620036
200242003515000061199182520010200102001012972471049169552003520035174283175042001020020200202003510411200211091020010100100001270004274519995200000100102003620036200362003620036
200242003515000061199182520010200102001012972471049169552003520035174283175042001020020200202003510411200211091020010100100001270004275519995200000100102003620036200362003620036
200242003515000061199182520010200102001012972471049169552003520035174283175042001020020200202003510411200211091020010100100001270004275419995200000100102003620036200362003620036
200242003515000061199182520010200102001012972470049169552003520035174283175042001020020200202003510411200211091020010100100001270005273319995200000100102003620036200362003620036
200242003515000061199182520010200102001012972471049169552003520035174283175042001020020200202003510411200211091020010100100001270004274519995200000100102003620036200362003620036
200242003515000061199182520010200102001012972471049169552003520035174283175042001020020200202003510411200211091020010100100001270003274519995200000100102003620036200362003620036
200242003515000061199172520010200102001012972471049169552003520035174283175042001020020200202003510411200211091020010100100001270005275519995200000100102003620036200362003620036
2002420035150000103199182520010200102001012972471049169552003520035174283175042001020020200202003510411200211091020010100100001270004275519995200000100102003620036200362003620036
2002420035150100350199182520010200322001012972471049169552003520035174283175042001020020200202003510411200211091020010100100001270004275419995200000100102003620036200362003620036

Test 3: throughput

Count: 8

Code:

  cmp x0, #3
  cmp x0, #3
  cmp x0, #3
  cmp x0, #3
  cmp x0, #3
  cmp x0, #3
  cmp x0, #3
  cmp x0, #3
  mov x0, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03191e3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6b6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fl1d tlb miss (a1)l1d cache writeback (a8)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020426761200002827801158011580121400590149236590267392673916679616689801218023280232267396611802011009910080100100000011151181160126736800151002674026740267402674026740
8020426739201002827801158011580121400590149236590267392673916679616689801218023280232267396611802011009910080100100000011151180160026736800151002674026740267402674026740
8020426739201002827801158011580121400590149236590267392673916679616689801218023280232267396611802011009910080100100000011151180160026736800151002674026740267402674026740
8020426739200002827801158011580121400590049236590267392673916679616689801218023280232267396611802011009910080100100000011151180160026736800151002674026740267402674026740
8020426739200002827801158011580121400590049236590267392673916679616689801218023280232267396611802011009910080100100000011151180160026736800151002674026740267402674026740
8020426739200002827801158011580121400590149236590267392673916679616689801218023280232267396611802011009910080100100000011151180160026736800151002674026740267402674026740
8020426739200002827801158011580121400590149236590267392673916679616689801218023280232267396611802011009910080100100000011151180160026736800151002674026740267402674026740
8020426739200002827801158011580121400590049236590267392673916679616689801218023280232267396611802011009910080100100000011151180160026736800151002674026740267402674026740
8020426739200002827801158011580121400590149236590267392673916679616689801218023280232267396611802011009910080100100000011151180160026736800151002674026740267402674026740
8020426739200002827801158011580121400590049236590267392673916679616689801218023280232267396611802011009910080100100000011151180160026736800151002677526740267402674026740

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e1f3a3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map int uop inputs (7f)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)9fcfd5map dispatch bubble (d6)dbddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800242671020000013025800108001080010400050149236252670526705166653166838001080020800202670566118002110910800101050201418014142670180000102670626706267062670626706
80024267052000003525800108001080010400050149236252670526705166653166838001080020800202670566118002110910800101050201218013142670180000102670626706267062670626706
80024267052000013525800108001080010400050149236252670526705166653166838001080020800202670566118002110910800101050201318013122670180000102670626706267062670626706
80024267052000003525800108001080010400050149236252670526705166653166838008580020800202670566118002110910800101050201218012122670180000102670626706267062670626706
80024267052000003525800108001080010400050149236252670526705166653166838001080020800202670566118002110910800101050201218012122670180000102670626706267062670626706
80024267052000003525800108001080010400050149236252670526705166653166838001080020800202670566118002110910800101050201218013122673980000102670626706267062670626706
800242670520000070025800108001080010400050049236252670526705166653166838001080020800202670566118002110910800101050201218013112670180000102670626706267062670626706
800242670520000041525800108001080010400050049236252670526705166653166838001080020800202670566118002110910800101050201118012132670180000102670626706267062670626706
80024267051990003525800108001080010400050049236252670526705166653166838001080020800202670566118002110910800101050201218014132670180000102670626706267062670626706
80024267052000003525800108001080010400050049236252670526705166653166838001080020800202670566118002110910800101050201318013122670180000102670626706267062670626706