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, 32-bit)

Test 1: uops

Code:

  ngc w0, w0
  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)031e3a3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)6d6emap 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
100410357300619172510001000100062250103510358053882100010002000103510411100110001073227119901000100010361036103610361036
10041035800849172510001000100062250103510358053882100010002000103510411100110000073127119901000100010361036103610361036
10041035800849172510001000100062250103510358053882100010002000103510411100110000073127119901000100010361036103610361036
10041035700619172510001000100062250103510358053882100010002000103510411100110000073127119901000100010361036103610361036
10041035800619172510001000100062250103510358053882100010002000103510411100110000073127119901000100010361036103610361036
10041035700619172510001000100062250103510358053882100010002000103510411100110000073127119901000100010361036103610361036
10041035800619172510001000100062250103510358053882100010002000103510411100110000073127119901000100010361036103610361036
10041035700619172510001000100062250103510358053882100010002000103510411100110000073127119901000100010361036103610361036
10041035700619172510001000100062250103510358053882100010002000103510411100110000073127119901000100010361036103610361036
10041035800619172510001000100062250103510358053882100010002000103510411100110000073127119901000100010361036103610361036

Test 2: Latency 1->2

Code:

  ngc w0, w0
  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)031e3f4d51schedule 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)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204100357506199202510100101001010064715214969551003510035865638732101001020020200100351021110201100991001010010071012711999210000101001003610036100361003610036
10204100357506199202510100101001010064715204969551003510035865638732101001020020200100351021110201100991001010010071012711999210000101001003610036100361003610036
1020410035751566199202510100101001010064715214969551003510035865638732101001020020200100351021110201100991001010010071012711999210000101001006710036100361003610036
10204100357506199202510100101001010064715214969551003510035865638732101001020020200100351021110201100991001010010071012711999210000101001003610036100361003610036
10204100357506199202510100101001010064715214969551003510035865638732101001020020200100351021110201100991001010010071012711999210000101001003610036100361003610036
102041003575216199202510100101001010064715204969551003510035865638732101001020020200100351021110201100991001010010071012711999210000101001003610036100361003610036
10204100357506199202510100101001010064715214969551003510035865638732101001020020200100351021110201100991001010010071012711999210000101001003610036100361003610036
10204100357596199202510100101001010064715204969551003510035865638732101001020020200100351021110201100991001010010071012711999210000101001003610036100361003610036
10204100357506199202510100101001010064715214969551003510035865638732101001020020200100351021110201100991001010010071012711999210000101001003610036100361003610036
1020410035752346199202510100101001010064715214969551003510035865638732101001020020200100351021110201100991001010010071012711999210000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)031e3f4d51schedule 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)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10024100357598299182510010100101001064724614969551003510035867838754100101002020020100351041110021109101001010064022722999310000100101003610036100361003610036
10024100357506199182510010100101001064724604969551003510035867838754100101002020020100351041110021109101001010064022722999310000100101003610036100361003610036
100241003575041199182510010100101001064724614969551003510035867838754100101002020020100351041110021109101001010064022722999310000100101003610036100361003610036
10024100357506199182510010100101001064724604969551003510035867838754100101002020020100351041110021109101001010064022722999310000100101003610036100361003610036
10024100357506199182510010100101001064724604969551003510035867838754100101002020020100351041110021109101001010064022722999310000100101003610036100361003610036
100241003576010599182510010100101001064724604969551003510035867838754100101002020020100351041110021109101001010064022722999310000100101003610036100361003610036
10024100357506199182510010100101001064724604969551003510035867838754100101002020020100351041110021109101001010064022722999310000100101003610036100361003610036
100241003575126199182510010100101001064724604969551003510035867838754100101002020020100351041110021109101001010064022722999310000100101003610036100361003610036
100241003575546199182510010100101001064724604969551003510035867838754100101002020020100351041110021109101001010064022722999310000100101003610036100361003610036
100241003575012699182510010100101001064724604969551003510035867838754100101002020020100351041110021109101001010064022722999310000100101003610036100361003610036

Test 3: Latency 1->3

Chain cycles: 1

Code:

  ngc w0, w1
  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)03181e1f3f4d51schedule 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 cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202042003515003602511992625202002020020200129765049169552003520035174063174812020020200302002003510411202011009920100001310228221999220100101002003620036200362003620036
20204200351500210611992625202002020020200129765049169552003520035174063174812020020200302002003510411202011009920100001310228221999220100101002003620036200362003620036
2020420035150000611992625202002020020200129765049169552003520035174063174812020020200302002003510411202011009920100001310228221999220100101002003620036200362003620036
2020420035150000611992625202002020020200129765049169552003520035174063174812020020200302002003510411202011009920100001310228221999220100101002003620036200362003620036
2020420035150000611992625202002020020200129765049169552003520035174063174812020020200302002003510411202011009920100001310228221999220100101002003620036200362003620036
2020420035150000611992625202002020020200129765049169552003520035174063175082020020200302002003510411202011009920100001310228221999220100101002003620036200362003620036
20204200351503120611992625202002020020200129765049169552003520035174063174812029220200302002003510411202011009920100001310228221999220100101002003620036200362003620036
20204200351500240611992625202002020020200129765049169552003520035174063174812020020200302002003510411202011009920100001310228221999220100101002003620036200362003620036
2020420035150000611992625202002020020200129765049169552003520035174063174812020020200302002003510411202011009920100001310228221999220100101002003620036200362003620036
2020420035150000611992625202002020020200129765049169552003520035174063174812020020200302002003510411202011009920100001310228221999220100101002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f3a3f4d51schedule 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)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200242003515000000072006119918252002020020200201297297149169552003520035174283175042002020020300202003510411200211092001000000001270227221999520010100102003620036200362003620036
20024200351500000000006119918252002020020200201297297049169552003520035174283175042002020020300202003510411200211092001040000001270227221999520010100102003620036200362003620036
20024200351500000000006119918252002020020200201297297049169552003520035174283175042002020020300202003510411200211092001000000001270227221999520010100102003620036200362003620036
20024200351500000000006119918252002020020200201297297049169552003520035174283175042002020020300202003510411200211092001000000001270227221999520010100102003620036200362003620036
20024200351500000000006119918252002020020200201297297049169552003520035174283175042002020020300202003510411200211092001000000001270227221999520010100102003620036200362003620036
20024200351500000000006119918252002020020200201297297049169552003520035174283175042002020020300202003510411200211092001000000001270227221999520010100102003620036200362003620036
2002420035150000000231006119918252002020020200201297297049169552003520035174283175042002020020300202003510411200211092001000000001270227221999520010100102003620036200362003620036
200242003515000000015176034619918252002020020200201297297049169552003520035174283175042002020020300202003510411200211092001000000001270227221999520010100102003620036200362003620036
20024200351500000009006119918252002020020200201297297049169552003520035174283175042002020020300202003510411200211092001000000001270227221999520010100102003620036200362003620036
20024200351500000000006119918252002020020200201297297049169552003520035174283175042002020020300202003510411200211092001000000001270227221999520010100102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  ngc w0, w8
  ngc w1, w8
  ngc w2, w8
  ngc w3, w8
  ngc w4, w8
  ngc w5, w8
  ngc w6, w8
  ngc w7, w8
  mov x8, 9

(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)03l2 tlb miss instruction (0a)l2 tlb miss data (0b)1e1f3a3f51schedule 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)acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)dde0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802042676420000000282780118801188012447991604923660267402674016679616689801248023216026426740661180201100991008010010000011151181602673780018801002674126741267412674126741
802042674020000000282780118801188012447991604923660267402674016679616689801248023216026426740661180201100991008010010000011151181602673780018801002674126741267412674126741
8020426740200000002182780118801188012447991604923660267402674016679616689801248023216026426740661180201100991008010010000011151181602673780018801002674126741267412674126741
802042674020110000282780118801188012447991604923660267402674016679616689801248023216026426740661180201100991008010010000011151181602673780018801002674126741267412674126774
802042674020000000282780118801188012447991604923660267402674016679616689801248023216026426740661180201100991008010010000011151181602673780018801002674126741267412674126741
802042674020000000282780118801188012447991604923660267402674016679616689801248023216026426740661180201100991008010010000011151181602673780018801002674126741267412674126741
802042674020000000282780118801188012447991604923660267402674016679616689801248023216026426740661180201100991008010010000011151181602673780018801002674126741267412674126741
802042674020100000282780118801188012447991604923660267402674016679616689801248023216026426740661180201100991008010010000011151181602673780018801002674126741267412674126741
802042674020000000282780118801188012447991604923660267402674016679616689801248023216026426740661180201100991008010010000011151181602673780018801002674126741267412674126741
802042674020000282880282780118801188012447991604923660267402674016691616718801248023216026426740661180201100991008010010000011151181602673780018801002674126741267412674126741

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)1e1f3f51schedule 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)9faccfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8002426711200000362580010800108001047205904923626267062670616665316684800108002016002026706661180021109108001010725020518452670280000800102670726707267072670726707
8002426706200000362580010800108001047205904923626267062670616665316684800108002016002026706661180021109108001010605020518552670280000800102670726707267072670726707
8002426706200000362580010800108001047205914923626267062670616665316684800108002016002026706661180021109108001010425020518652670280000800102670726707267072670726707
800242670619900036258001080010800104720590492362626706267061666531668480010800201600202670666118002110910800101005020718562670280000800102670726707267072670726707
8002426706200000362580010800108001047205904923626267062670616665316684800108002016002026706661180021109108001010485020518562670280000800102670726707267072670726707
80024267062070003625800958001080010472059149236262670626706166653166848001080020160020267066611800211091080010101355020518552670280000800102670726707267072670726707
8002426706200027903625800108001080010472059049236262670626706166653166848001080020160020267066611800211091080010101415020518562670280000800102670726707267072670726707
8002426706200000362580010800108001047205904923626267062670616665316684800108002016002026706661180021109108001010785020518642670280000800102670726707267072670726707
80024267062000003625800108001080010472059049236262670626706166653166848001080020160020267066611800211091080010101055020518452670280000800102670726707267072670726707
8002426706200000362580010800108001047205904923626267062670616665716684800108002016002026706661180021109108001010545020418662670280000800102670726707267072670726707