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

ADD (register, lsl, 64-bit)

Test 1: uops

Code:

  add x0, x0, x1, lsl #17
  mov x0, 1
  mov x1, 2

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 2.000

Integer unit issues: 2.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)03mmu table walk data (08)1e3f4c4d51schedule 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
100420351500103100017352520002000100032570120352035157531842100010002000203542111001100000731671117812000100020362036203620362036
10042035150061100017352520002000100032570020352035157531842100010002000203542111001100000731671117812000100020362036203620362036
10042035150061100017352520002000100032570120352035157531842100010002000203542111001100000731671117812000100020362036203620362036
10042035150061100017352520002000100032570120352035157531842100010002000203542111001100000731671117812000100020362036203620362036
100420351501261100017352520002000100032570120352035157531842100010002000203542111001100000731671117812000100020362036203620362036
10042035150061100017352520002000100032570020352035157531842100010002000203542111001100000731671117812000100020362036203620362036
10042035150061100017352520002000100032570120352035157531842100010002000203542111001100000731671117812000100020362036203620362036
10042035160061100017352520002000100032570120352035157531842100010002000203542111001100000731671117812000100020362036203620362036
10042035150061100017352520002000100032570120352035157531842100010002000203542111001100000731671117812000100020362036203620362036
100420351501261100017352520002000100032570120352035157531842100010002000203542111001100000731671117812000100020362036203620362036

Test 2: Latency 1->2

Code:

  add x0, x0, x1, lsl #17
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)03mmu table walk data (08)091e3f4c4d51schedule 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)st unit uop (a7)l1d cache writeback (a8)a9acbranch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204200351501096110000198032520100201001010018534214916955200352003518429318700101001020020200200354211102011009910010100100000000710159111979120000101002003620036200362003620036
10204200351500006110000198032520100201001010018534214916955200352003518429318700102531020020200200354211102011009910010100100000000710159111979120000101002003620036200362003620036
10204200351500006110000198032520100201001010018534214916955200352003518429318700101001020020200200354211102011009910010100100000000710159111979120000101002003620036200362003620036
10204200351500006110000198032520100201001024918717214917000200352003518429318700101001020020200200354211102011009910010100100312200710159111979120000101002003620036200362003620036
10204200351500006110000198032520100201001010018534214916955200352003518429318700101001020020200201264221102011009910010100100000000710159111979120000101002003620036200362003620036
10204200351500006110000198032520100201261010018534214916955200822003518429318700101001020020534200354211102011009910010100100000000710159111979120000101002003620036200362003620036
102042003515000096410000198032520100201001010018534214916955200352003518429318700101001020020200200354211102011009910010100100000000710159111979120000101002003620036200362003620036
102042003515001016310000198032520100201001010018534214916955200352003518429318700101001020020200200354211102011009910010100100000000710169111979120000101002003620036200362003620036
10204200351500006110000198032520100201001010018534214916955200352003518429318700101001020020200200354211102011009910010100100000000710159111979120000101002003620036200362003620036
10204200351500006110000198032520100201001010018534214916955200352003518429318700101001020020200200354211102011009910010100100000000710159111979120000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)0318191e3a3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6d6emap stall dispatch (70)int prf full (71)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
100242003515000003591000019743252001020010100101853100491695520035200351845103187181001010020200202003542111002110910100101003640363221979220000100102003620036200362003620036
10024200351500000611000019743252001020010100101853100491695520035200351845103187181001010020200202003542111002110910100101000640263221979220000100102003620036200362003620036
10024200351500000611000019743252001020010100101853100491695520035200351845103187181001010020200202003542111002110910100101000640263221979220000100102003620036200362003620036
100242003515000001031000019743252001020010100101853100491695520035200351845103187181001010020200202003542111002110910100101000640263221979220000100102003620036200362003620036
100242003515000001491000019743252001020010100101853100491695520035200351845103187181001010020200202003542111002110910100101000640263221979220000100102003620036200362003620036
1002420035150000010361000019743252001020010100101853100491695520035200351845103187181001010183200202003542111002110910100101000640263221979220000100102003620036200362003620036
10024200351500000611000019743252001020010100101853100491695520035200351845103187181001010020200202003542111002110910100101010640263221979220000100102003620036200362003620036
100242003515000002511000019743252001020010100101853100491695520035200351845173187181001010020200202003542111002110910100101000640263221979220000100102003620036200362003620036
1002420035150000010591000019743252001020010100101853100491695520035200351845103187181001010020200202003542111002110910100101000640263221979220000100102003620036200362003620036
10024200351500000611000019743252001020010100101853100491695520035200351845103187181001010020200202003542111002110910100101000640263221979220068100102003620036200362003620036

Test 3: Latency 1->3

Code:

  add x0, x1, x0, lsl #17
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)031e3f4c4d51schedule 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
10204200351500472100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000710259111979120000101002003620036200362017320036
1020420035150082100001980325201002010010100185342149169552003520035184293187001010010200202002003542211020110099100101001000710159111979120000101002003620036200362003620036
1020420035150061100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000710159111979120000101002003620036200362003620036
1020420035150061100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000710159111979120000101002003620036200362003620036
10204200351500270100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000710159111979120000101002003620036200362003620036
10204200351500110100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000710159111979120000101002003620036200362003620036
1020420035150082100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000710159111979120000101002003620036200362003620036
10204200351500124100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001001710159111979120000101002003620036200362003620036
1020420035150061100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000710159111979120000101002003620036200362003620036
1020420035150061100001980325201002010010100185342049169552003520035184293187001010010200202002003542111020110099100101001000710159111979120000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)031e3f4c4d51schedule 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)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100242003515006110000197432520010200101001018531014916955200352003518451318718100101002020020200354211100211091010010100000640263221979220000100102003620036200362003620036
1002420035150366110000197432520010200101001018531014916955200352003518451318718100101002020020200354211100211091010010100000640263221979220000100102003620036200362003620036
100242003515066110000197432520010200101015318531014916955200352003518451318718100101002020020200354211100211091010010100000640263221979220000100102003620036200362003620036
100242003514936110000197432520010200101001018531014916955200352003518451318718100101002020020200354211100211091010010100000640263221979220000100102003620036200362003620036
10024200351503036110000197432520010200101001018531014916955200352003518451318718100101002020020200354211100211091010010100000640263221979220000100102003620036200362003620036
100242003515006110000197432520010200101001018531014916955200352003518451318718100101002020020200354211100211091010010100000640263221979220000100102003620036200362003620036
1002420035150061100001974325200102001010010185310149169552003520035184511218718100101002020020200354211100211091010010100000640263221979220000100102003620036200362003620036
1002420035150156110000197432520010200101001018531014916955200352003518451318718100101002020020200354211100211091010010100000640263221979220000100102003620036200362003620036
100242003515006110000197432520010200101001018531014916955200352003518451318718100101002020020200354211100211091010010100000640263221979220000100102003620036200362003620036
100242003515006110000197432520010200101001018531014916955200352003518451318718100101002020020200354211100211091010010100000640263221979220000100102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  add x0, x8, x9, lsl #17
  add x1, x8, x9, lsl #17
  add x2, x8, x9, lsl #17
  add x3, x8, x9, lsl #17
  add x4, x8, x9, lsl #17
  add x5, x8, x9, lsl #17
  add x6, x8, x9, lsl #17
  add x7, x8, x9, lsl #17
  mov x8, 9
  mov x9, 10

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03l2 tlb miss data (0b)1e1f3f4c4d51schedule 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)9fld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9accfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020426769200012061800002609425160100160100801001643180049236452672526725166153166778010080200160200267253911802011009910080100100000005110003221126717160000801002672626726267262672626726
8020426725200027061800002609425160100160100801001643180049236452672526725166153166778010080200160200267253911802011009910080100100000095110001221126717160000801002672626726267262672626726
8020426725200000535800002609425160100160100801001643180049236452672526725166153166778010080200160200267253911802011009910080100100000005110001221126717160000801002672626726267262672626726
8020426725200033061800002609425160100160100801001643180049236452672526725166153166778010080200160200267253911802011009910080100100000005110001221126717160000801002672626726267262672626726
8020426725200015061800002609425160100160100801001643180049236452672526725166153166778010080200160200267253911802011009910080100100000005110001221126717160000801002672626726267262672626726
802042672520000061800002609425160100160100801001643180049236452672526725166153166778010080200160200267253911802011009910080100100000005110001221126717160000801002672626726267262672626726
8020426725200027061800002609425160100160100801001643180049236452672526725166153166778010080200160200267253911802011009910080100100000005110001221126717160000801002672626726267262672626726
8020426725200012061800002609425160100160100801001643180049236452672526725166153166778010080200160200267253911802011009910080100100000005110001221126717160000801002672626726267262672626726
8020426725200015061800002609425160100160100801001643181049236452672526725166153166778010080200160200267253911802011009910080100100000005110001221126717160000801002672626726267262672626726
802042672520000061800002609425160100160100801001643180049236452672526725166153166778010080200160200267253911802011009910080100100000005110001221126717160000801002672626726267262672626726

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3f4c4d51schedule 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 cache writeback (a8)cfd5map dispatch bubble (d6)dbddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80024267352002526180000212802516001016001080010163142049236310267112671116623316685800108002016002026711391180021109108001010050201722013826704160000800102671226712267122671226712
8002426711200061800002128025160010160010800101631420492363102671126711166233166858001080020160020267113911800211091080010100502013220131426704160000800102671226712267122671226712
8002426711200306180000212802516001016001080010163142049236310267112671116623316685800108002016002026711391180021109108001010050201322013826704160000800102671226712267122671226712
80024267112002761800002128025160010160010800101631420492363102671126711166233166858001080020160020267113911800211091080010100502013220121326704160000800102671226712267122671226712
80024267112002461800002128025160010160010800101631420492363102671126711166233166858001080020160020267113911800211091080010100502012220121226704160000800102671226712267122671226712
8002426711207061800002128025160010160010800101631420492363102671126711166233166858001080020160020267113911800211091080010100502011220131126704160000800102671226712267122671226712
80024267112001561800002128025160010160010800101631421492363102671126711166233166858001080020160020267113911800211091080010100502013220101326704160000800102671226712267122671226712
8002426711200336180000212802516001016001080010163142049236310267112671116623316685800108002016002026711391180021109108001010050201222012826704160000800102671226712267122671226766
80024267112003061800002128025160010160010800101631420492363102671126711166233166858001080020160020267113911800211091080010100502012220131126704160000800102671226712267122671226712
8002426711200156180000212802516001016001080010163142049236310267112671116623316685800108002016002026711391180021109108001010050208220121226704160000800102671226712267122671226712