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

NGC (register, 64-bit)

Test 1: uops

Code:

  ngc x0, x0
  mov x0, 1
  mov x1, 2

(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)031e3f4d51schedule 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)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10041035706191725100010001000622501103510358053882100010002000103510411100110000073427229901000100010361036103610361036
100410358246191725100010001000622501103510358053882100010002000103510411100110000073227229901000100010361036103610361036
10041035806191725100010001000622500103510358053882100010002000103510411100110000073227229901000100010361036103610361036
10041035806191725100010001000622500103510358053882100010002000103510411100110000073227229901000100010361036103610361036
10041035806191725100010001000622500103510358053882100010002000103510411100110000073227229901000100010361036103610361036
10041035806191725100010001000628780103510358053882100010002000103510411100110000073227229901000100010361036103610361036
10041035706191725100010001000622500103510358053882100010002000103510411100110000073227229901000100010361036103610361036
10041035896191725100010001000622501103510358053882100010002000103510411100110000073227229901000100010361036103610361036
10041035806191725100010001000622501103510358053882100010002000103510411100110000073227229901000100010361036103610361036
10041035806191725100010001000622501103510358053882100010002000103510411100110000073227229901000100010361036103610361036

Test 2: Latency 1->2

Code:

  ngc x0, x0
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e3f4d51schedule 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 access (a0)l1d tlb miss (a1)l1d cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204100357500000619920251010010100101006471520496955100351003586563873210100102002020010035102111020110099100101001000000071022711999210000101001003610036100361003610036
1020410035750000061992025101001010010100647152149695510035100358656387321010010200202001003510211102011009910010100100000898071012711999210000101001003610036100361003610036
10204100357500000619920251010010100101006471520496955100351003586563873210100102002020010035102111020110099100101001000000071012711999210000101001003610036100361003610036
102041003575000015619920251010010100101006471520496955100351003586563873210100102002020010035102111020110099100101001000000071012711999210000101001003610036100361003610036
10204100357500000619920251010010100101006471520496955100351003586563873210100102002020010035102111020110099100101001000000071012711999210000101001003610036100361003610036
10204100357500000619920251010010100101006471521496955100351003586563873210100102002020010035102111020110099100101001000000071012711999210000101001003610036100361003610058
102041003575000006199202510100101001010064715204969551003510035865638732101001020020200100351021110201100991001010010000236071012711999210000101001003610036100361003610036
10204100357800000619920251010010100101006471520496955100351003586563873210100102002020010035102111020110099100101001000000071012711999210000101001003610036100361003610036
10204100357500000619920251010010100101916471521496955100351003586563873210100102002020010035102111020110099100101001000000071012711999210000101001003610036100361003610036
10204100357500000619920251010010100101006471520496955100351003586563873210100102002020010035102111020110099100101001000009071012711999210000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03l2 tlb miss data (0b)1e1f3f4d51schedule 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 cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10024100357500061991825100101001010010647246049695510035100358678387541001010020200201003510411100211091010010100064022722999310000100101003610036100361003610036
10024100357500061991825100101001010010647246049695510035100358678387541001010020200201003510411100211091010010100064022722999310000100101003610036100361003610036
10024100357500061991825100101001010010647246049695510035100358678387541001010020200201003510411100211091010010100064022722999310000100101003610036100361003610036
100241003575000619918251001010010100106472460496955100351003586783875410010100202002010035104111002110910100101011064022722999310000100101003610036100361003610036
10024100357500061991825100101001010010647246149695510035100358678387541001010020200201003510411100211091010010100064022722999310000100101003610036100361003610036
100241003575000619918251001010010100106472460496955100351003586783875410010100202002010035104111002110910100101004564022722999310000100101003610036100361003610036
10024100357500061991825100101001010010647246049695510035100358678387541001010020200201003510411100211091010010100064022722999310000100101003610036100361003610036
1002410035750141061991825100101001010010647246049695510035100358678387541001010020200201003510411100211091010010100064022722999310000100101003610036100361003610036
10024100357500061991825100101001010010647246049695510035100358678387541001010020200201003510411100211091010010100064022722999310000100101003610036100361003610036
10024100357500061991825100101001010010647246049695510035100358678387541001010020200201003510411100211091010010100964022722999310000100101003610036100361003610036

Test 3: Latency 1->3

Chain cycles: 1

Code:

  ngc x0, x1
  tst x0, 1
  mov x0, 1
  mov x1, 2
  mov x2, 3

(non-fused SUB/CBNZ loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03l2 tlb miss data (0b)18191e3f4d51schedule 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 int alu (97)l1d tlb access (a0)ld unit uop (a6)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202042003515000006119930252020020200202121297733049169552003520035174257174862021220224302362003510411202011009920100000571111320016002001120122101002003620036200362003620036
2020420035150000576119930252020020200202121297733149169552003520035174063174812020020200302002003510411202011009920100000180001310128111999220100101002003620036200362003620036
20204200351500000611992625202002020020200129765004916955200352003517406317481202002020030200200351041120201100992010000530001310128111999220100101002003620036200362003620036
202042003515000006119926252020020200202001297650049169552003520035174063174812020020200302002003510411202011009920100022730001310128111999220100101002003620036200362003620036
20204200351500000611992625202002020020200129765004916955200352003517406317481202002020030200200351041120201100992010000200001310128111999220100101002003620036200362003620036
2020420035150000061199262520200202002020012976500491695520035200671740631748120200202003020020035104112020110099201000023510001310128111999220100101002003620036200362003620036
20204200351500000611992625202002020020200129765004916955200352003517406317481202002020030200200351041120201100992010000660001310128111999220100101002003620036200362003620036
20204200351500000611992625202002020020200129765004916955200352003517406317481202002020030200200351041120201100992010000030001310128111999220100101002003620036200362003620036
202042003515011101031992625202002020020200129765004916955200352003517413317481202822020030200200351041120201100992010000060001310128111999220100101002003620036200362003620036
2020420035150000061199262520200202002020012976500491695520035200351740631748120200202003033520035104112020110099201000024720001310128111999220100101002003620068200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03181e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)696a6d6emap 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 int alu (97)l1d tlb access (a0)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200242003515000611991825200202002020020129729749169552003520035174283175042002020020300202003510411200211092001002531270327231999520010100102003620036200362003620036
200242003515000611991825200202002020020129729749169552003520035174283175042002020020300202003510411200211092001002831270327331999520010100102003620036200362003620036
200242003515000611991825200202002020020129729749169552003520035174283175042002020020300202003510411200211092001002601270327231999520010100102003620036200362003620036
20024200351500061199182520020200202002012972974916955200352003517428317504200202002030020200351041120021109200100001270227231999520010100102003620036200362003620036
20024200351502061199182520020200202002012972974916955200352003517428317504200202002030020200351041120021109200100001270327331999520010100102003620036200362003620036
200242003515000611991825200202002020020129729749169552003520035174283175042002020020300202003510411200211092001001591270327321999520010100102003620036200362003620036
20024200351500061199182520020200202002012972974916955200352003517428317504200202002030020200351041120021109200100001270227231999520010100102003620036200362003620036
20024200351500061199182520020200202002012972974916955200352003517428317504200202002030020200351041120021109200100001270327331999520010100102003620036200362003620036
20024200351500061199182520020200202002012972974916955200352003517428317504200202002030020200351041120021109200101001270227331999520010100102003620036200362003620036
20024200351500061199182520020200202002012972974916955200352003517428317504200202002030020200351041120021109200100061270327341999520010100102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  ngc x0, x8
  ngc x1, x8
  ngc x2, x8
  ngc x3, x8
  ngc x4, x8
  ngc x5, x8
  ngc x6, x8
  ngc x7, x8
  mov x8, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)1e3f51schedule 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 cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802042674020000693278011880118801244799161492366026740267401667961668980124802321602642674066118020110099100801001002901115134016002673780018801002674126741267412674126741
8020426740200092827801188011880124479916049236602674026740166796166898012480232160264267406611802011009910080100100001115118016002673780018801002674126741267412674126741
80204267402000028278011880118801244799160492366026740267401667961668980124802321602642674066118020110099100801001006301115118016002673780018801002674126741267412674126741
802042674020000219278011880118801244799161492366026740267401667961668980124802321602642674066118020110099100801001004931115118016002673780018801002677426741267412674126741
8020426740200002827801188011880124479916049236602674026740166796166898012480232160264267406611802011009910080100100191115118016002673780018801002674126741267412674126741
8020426788201002827801188011880124479916049236602674026740166796166898012480232160264267406611802011009910080100100061115118016002673780018801002674126741267412674126741
8020426740200002827801188011880124479916149236602674026740166796166898012480232160264267406611802011009910080100100101115118016002673780018801002674126741267412674126741
802042674020000102427801188011880124479916149236602674026740166796166898012480232160264267406611802011009910080100100101115118016002673780018801002674126741267412674126741
8020426740201002827801188011880124479916149236602674026740166796166898012480232160264267406611802011009910080100100101115118016002673780018801002674126741267412674126741
80204267402000050327801188011880124479916049236602674026740166796166898012480232160264267406611802011009910080100100101115118016002673780018801002674126741267412674126741

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3f51schedule 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 access (a0)l1d tlb miss (a1)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8002426722200000000782580010800108001047205904923626267062670616665316684800108002016002026706661180021109108001010000000005020718432673680000800102689226707267072670726849
80024267062010000003634680073800108007747105104923814267512670616690316711800108002016002026706661180021109108001010000000905020318342670280000800102670726707267072670726707
80024267062000000001362580010800108001047205904923626267062670616665316684800108002016002026706661180021109108001010000000605020418442670280000800102670726707267072670726707
8002426706200000000362580010800108001047205904923626267062670616665316684800108002016002026706661180021109108001010000000605020418342670280000800102670726707267072670726707
8002426706200000000782580010800108001047205904923626267062670616665316684800108002016016826706661180021109108001010202110005020427442670280067800102670726707267072670726707
8002426706200000000362580010800108001047205904923626267062670616665316684800108002016002026706661180021109108001010000000305020318442670280000800102670726707267072670726707
8002426892200000000362580010800108001047205904923626267062670616665316684800108002016002026706661180021109108001010000010005020318432670280000800102670726707267072670726707
80024267062000000120362580010800108001047205914923626267062670616665316684800108002016002026706661180021109108001010000000305020418442670280000800102670726707267072670726707
80024267061990000008002580010800108001047205904923626267062670616665316684800108002016002026706661180021109108001010000010005020318342670280000800102670726707267072670726707
8002426706200000000362580010800108001047205904923626267062670616665316684800108002016002026706661180021109108001010000030005020318342670280000800102670726707267072670726707