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

MADD (32-bit)

Test 1: uops

Code:

  madd w0, w0, w1, w2
  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)03mmu table walk instruction (07)1e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696d6emap 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 tlb access (a0)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10043033230061192225100010001000814400403033303327603289110001000300030333801110011000000731161229391000100030343034303430343034
10043033230061192225100010001000814401403033303327603289110001000300030333801110011000030731161229391000100030343034303430343034
10043033230061192225100010001000814400403033303327603289110001000300030333801110011000000731161229391000100030343034303430343034
10043033220061192225100010001000814400403033303327603289110001000300030333801110011000000731161229391000100030343034303430343034
10043033220361192225100010001000814400403033303327603289110001000300030333801110011000000731161229391000100030343034303430343034
10043033230061192225100010001000814400403033303327603289110001000300030333801110011000000731161229391000100030343034303430343034
10043033230061192225100010001000814401403033303327603289110001000300030333801110011000000731161229391000100030343034303430343034
10043033220061192225100010001000814401403033303327603289110001000300030333801110011000000731161229391000100030343034303430343034
10043033230082192225100010001000814400403033303327603289110001000300030333801110011000020731161229391000100030343034303430343034
10043033230361192225100010001000814400403033303327603289110001000300030333801110011000000731161229391000100030343034303430343034

Test 2: Latency 1->2

Code:

  madd w0, w0, w1, w2
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0033

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 tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102043003322548061199222510100101001010082894004926953300333003328610328741101001020030200300333741110201100991001010010000000710116112993910000101003003430034300343003430034
102043003322518361199222510100101001010082894004926953300333003328610328741101001020030346300753743110201100991001010010000000710116112993910000101003003430034300343003430034
102043006222432161199222510100101001010082894004926953300333003328610328741101001020030200300333741110201100991001010010000000710116112993910000101003003430034300343003430034
102043003322551961199222510100101001010082894014926953300333003328610328741101001020030200300333741110201100991001010010000000710116112993910000101003003430034300343003430034
102043003322574461199222510100101001010082894004926953300333003328610328741101001020030200300333741110201100991001010010000000710116112993910000101003003430034300343003430034
102043003322541161199222510100101001013882894004926953300333003328610328741101001020030200300333741110201100991001010010000000710116112993910000101003003430034300343003430034
102043003322539361199222510100101001010082894004926953300333003328610328741101001020030200300773741110201100991001010010000000710116112993910000101003003430034300343003430034
102043003322543261199222510100101001010082894004926953300333003328610328741101001020030200300333741110201100991001010010000000710116112993910000101003003430034300343003430034
10204300332259661199222510100101001010082894004926953300333003328610328741101001020030200300333741110201100991001010010000000710116112993910000101003003430034300343003430034
102043003322540261199222510100101001010082894004926953300333003328610328741101001020030200300753741110201100991001010010042201060710116122993910000101003003430034300343003430034

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0033

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)9fld unit uop (a6)l1d cache writeback (a8)acc2branch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100243003322508219922251001010010100108284901492695330033300332863232876310010100203002030033380111002110910100101000000640416442993910000100103003430034300343003430034
100243003322506119922251001010010100108284901492695330033300332863232876310010100203002030033380111002110910100101000000640416432993910000100103003430034300343003430034
100243003322406119922251001010010100108284901492695330033300332863232876310010100203002030033380111002110910100101000000640416432993910000100103003430034300343003430034
100243003322506119922251001010010100108284901492695330033300332863232876310010100203002030033380111002110910100101000000640516432993910000100103003430034300343003430034
100243003322506119922251001010010100108284901492695330033300332863232876310010100203002030033380111002110910100101000000640416432993910000100103003430034300343003430034
1002430033225126119922251001010010100108284900492695330033300332863232876310010100803002030033380111002110910100101000000640416342993910000100103003430034300343003430034
100243003322506119922251001010010100108284901492695330033300332863232876310010100203002030033380111002110910100101000000640416442993910000100103003430034300343003430034
100243003322506119922251001010010100108284901492695330033300332863232876310010100203002030033380111002110910100101000000640316342993910000100103003430034300343003430034
100243003322406119922251001010010100108284901492695330033300332863232876310010100203002030033380111002110910100101000000640316432993910000100103003430034300343003430034
100243003322506119922251001010010100108284901492695330033300332863232876310010100203002030033380111002110910100101000000640416432993910000100103003430034300343003430034

Test 3: Latency 1->3

Code:

  madd w0, w1, w0, w2
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0033

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3a3f4d51schedule 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 branch cond (94)inst int alu (97)9fl1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)acc2branch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204300332250000000611992225101001010010100828940492695330033300332861032874110100102003020030033374111020110099100101001000000000710216112993910000101003003430034300343003430034
10204300332250000000611992225101001010010100828940492695330033300332861032874110100102003020030033374111020110099100101001000000000710116112993910000101003003430034300343003430034
10204300332250000000611992225101001010010100828940492695330033300332861032874110100102003020030033374111020110099100101001000000000710116112993910000101003003430034300343003430034
102043003322500043000611992225101001010010100828940492695330033300332862532874110100102003020030033374111020110099100101001000000000710116112993910000101003003430034300343003430034
10204300332250000000611992225101001010010100828940492695330033300332861032874110100102003020030033374111020110099100101001000000000710116112993910000101003003430034300343003430034
10204300332250000000611992225101001010010100828940492695330033300332861032874110100102003020030033374111020110099100101001000000000710116112993910000101003003430034300343003430034
10204300332250000000611992225101001010010100828940492695330033300332861032874110100102003020030033374111020110099100101001000000000710116112993910000101003003430034300343003430034
102043003322501110002548197902631019310212104578301784927387305093051228771442905810498107423180430511374121102011009910010100100002012010408731106213032410112101003051130557305093041830555
102043054422811111218211056035391979015510208102111055383018149274683055730586287875729060105271078831510305913741311020110099100101001000201917820852381233027610113101003055430594304283055130553
102043055822900127158496813545197903051022710219105298304114927478306013037828786282906210524107103209330336374131102011009910010100100423012450208791112323032310096101003003430034300343003430034

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0033

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)acc2branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10024300332250611992225100101001010010828490049269533003330033286323287631001010020300203003338011100211091010010100000640416442993910000100103003430034300343003430034
10024300332250611992225100101001010010828490149269533003330033286323287631001010020300203003338011100211091010010100000640417342993910000100103003430034300343003430034
10024300332240611992225100101001010010828490049269533003330033286323287631001010020300203003338011100211091010010100000640416442993910000100103003430034300343003430034
10024300332250611992225100101001010010828490049269533003330033286323287631001010020300203003338011100211091010010100000640316442993910000100103003430034300343003430034
10024300332240611992225100101001010010828490049269533003330033286323287631001010020300203003338011100211091010010100000640416442993910000100103003430034300343003430034
10024300332240611992225100101001010010828490049269533003330033286323287631001010020300203003338011100211091010010100000640316342993910000100103003430034300343003430034
10024300332250611992225100101001010010828490049269533003330033286323287631001010020300203003338011100211091010010100000640416442993910000100103003430034300343003430034
10024300332250611992225100101001010010828490049269533003330033286323287631001010020300203003338011100211091010010100000640316432993910000100103003430034300343003430034
10024300332250611992225100101001010010828490049269533003330033286323287631001010020300203003338011100211091010010100000640316442993910000100103003430034300343003430034
10024300332250611992225100101001010010828490049269533003330033286323287631001010020300203003338011100211091010010100000640416432993910000100103003430034300343003430034

Test 4: Latency 1->4

Code:

  madd w0, w1, w2, w0
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 1.0037

retire uop (01)cycle (02)031e3f51schedule 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
1020410037751248251010010100101007049804969571003710037871438745101001020030200100371621110201100991001010010000710116111003310000101001003810038100381003810038
1020410037760238251010010100101007049804969571003710037871438745101001020030200100371621110201100991001010010000710116111003310000101001003810038100381003810038
102041003775048251010010100101007049804969571003710037871438745101001020030200100371621110201100991001010010010710116111003310000101001003810038100381003810038
1020410037751548251010010100101007049804969571003710037871438745101001020030200100371621110201100991001010010000710116111003310000101001003810038100381003810038
10204100377526448251010010100101007049804969571003710037871438745101001020030200100371621110201100991001010010000710116111003310000101001003810038100851003810038
102041003775048251010010100101007049804969571003710037871438745101001020030200100371621110201100991001010010000710116111003310000101001003810038100381003810038
102041003775348251010010100101007049804969571003710037871438745101001020030200100371621110201100991001010010003710116111003310000101001003810038100381003810038
102041003775048251010010100101007049804969571003710037871438745101001020030200100371621110201100991001010010000710116111003310000101001003810038100381003810038
102041003775648251010010100101007049804969571003710037871438745101001020030200100371621110201100991001010010000710116111003310000101001003810038100381003810038
1020410037750618251010010100101007049804969571003710037871438745101001020030200100371621110201100991001010010000710116111003310000101001003810038100381003810038

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0037

retire uop (01)cycle (02)03mmu table walk data (08)091e3a3f51schedule 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 branch cond (94)inst int alu (97)9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100241003776000048251001010010100107004849695710037100378736387671001010020300201003716411100211091010010100000640216221003310000100101003810038100381003810038
100241003775000048251001010010100107004849695710037100378736387671001010020300201003716411100211091010010100000640216221003310000100101003810038100381003810038
100241003775000048251005610010100107004849695710037100378736387671001010020300201003716411100211091010010100033640216221003310000100101003810038100381003810038
100241003775000048251001010010100107004849695710037100378736387671001010020300201003716411100211091010010100003640216221003310000100101003810038100381003810038
100241003775000048251001010010100107004849695710037100378736387671001010020300201003716411100211091010010100000640216221003310000100101003810038100381003810038
100241003776000048251001010010100107004849695710037100378736387671001010020300201003716411100211091010010100000640216221003310000100101003810038100381003810038
100241003775000048251001010010100107004849695710037100378736387671001010020300201003716411100211091010010100000640216221003310000100101003810038100381003810038
1002410037750000482510010100101001070048496957100371003787923876710010100203002010037164111002110910100101000113640216221003310000100101003810038100381003810038
100241003775000048251001010010100107004849695710037100378736387671001010020300201003716411100211091010010100013640216221003310000100101003810038100381003810038
100241003775000048251001010010100107004849695710037100378736387671001010020300201003716411100211091010010100000640216221003310000100101003810038100381003810038

Test 5: throughput

Count: 8

Code:

  madd w0, w8, w9, w9
  madd w1, w8, w9, w9
  madd w2, w8, w9, w9
  madd w3, w8, w9, w9
  madd w4, w8, w9, w9
  madd w5, w8, w9, w9
  madd w6, w8, w9, w9
  madd w7, w8, w9, w9
  mov x8, 9
  mov x9, 10
  mov x10, 11

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)09l2 tlb miss data (0b)18191e1f3f51schedule 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 access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020480036599000001050462580100801008010040050004976955080035800356996436999380100802002402008003516411802011009910080100100000003005110116118003180000801008003680036800368003680036
80204800355990000000462580100801008010040050004976955080035800356996436999380100802002402008003516411802011009910080100100000000005110116118003180000801008003680036800368003680036
80204800355990000000462580100801008010040050004976955080035800356996436999380100802002402008003516411802011009910080100100000003005110116118003180000801008003680036800368003680036
80204800355990000000462580100801008010040050014976955080035800356996436999380100802402402008003516411802011009910080100100000000005110116118003180000801008003680036800368003680036
80204800356000000000462580100801008010040050004976955080035800356996436999380100802002402008003516411802011009910080100100000000005110116118003180021801008003680036800368003680036
802048003559900000360462580100801008010040050004976955080035800356996436999380100802002402008003516411802011009910080100100000000005110116118007180000801008003680036800368003680036
80204800355990000000462580100801008010040060714976955080035800356996436999380100802002402008003516411802011009910080100100000000005110116118007180000801008003680036800368003680036
80204800356000000000462580100801008010040050004976955080035800356996436999380100802002402008003516411802011009910080100100000000005110116118003180000801008003680036800368003680036
80204800355990000000462580100801008010040050004976955080035800356996436999380100802002402008003516411802011009910080100100000000005110116118003180000801008003680036800368003680036
80204800355990000000672580100801008010040050014976955080035800356996436999380100802002402008003516411802011009910080100100000009005110116118003180000801008003680036800368003680036

1000 unrolls and 10 iterations

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

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)18191e1f3a3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)5f60696a6d6emap 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)l1d cache writeback (a8)a9acc2branch mispred nonspec (cb)cfd2l1i cache miss demand (d3)d5map dispatch bubble (d6)daddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800248003559910100000149258001080010800104001570049769558003580035699863700158001080020240020800351641180021109108001010000000005022001516015158003280000800108003680036800368003680036
80024800356001010000014925800108001080010400050014976955800358003569986370015800108002024002080035164118002110910800101000000189005023001416010168003280000800108003680036800368003680036
800248003560010100000149258001080010800104000500049769558003580035699863700158001080020240020800351641180021109108001010000000005022001616013158003280000800108003680036800368003680036
8002480035599101000901492580010800108001040005001497695580035800356998677004880010800202400208003516411800211091080010100005900005022001516012108003280000800108003680036800368003680036
8002480035600101000001220258001080010800104000500049769558003580035699863700158001080020240020800351641180021109108001010000000005022001316014118003280000800108003680036800368003680036
800248003559910100000149258001080010800104000500049769558003580035699863700158001080020240020800351641180021109108001010000000005022001416013128003280000800108003680036800368003680036
800248007460010100000171425800108001080010400050014976955800358003569986370015800108002024002080035164118002110910800101000000000502200131601498003280000800108003680036800368003680036
800248003559910100000171425800108001080010400050004976955800358003569986370015800108002024002080035164118002110910800101000000000502300151601198003280000800108003680036800368003680036
800248003559910100000249258001080010800104000500149769558003580035699863700158001080020240020800351641180021109108001010000000005022001516016108003280000800108003680036800368003680036
800248003560010100000249258001080010800104000500049769558003580035699863700158001080020240020800351641180021109108001010000000005023001416015148003280000800108003680036800368003680036