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

Test 1: uops

Code:

  add w0, w0, w1, asr #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)031e3f4c4d51schedule 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10042035150611000173525200020001000325702035203515753184210001000200020354211100110000732671117812000100020362036203620362036
10042035156611000173525200020001000325702035203515753184210001000200020354211100110000731671117812000100020362036203620362036
10042035150611000173525200020001000325702035203515753184210001000200020354211100110000731671117812000100020362036203620362036
10042035159611000173525200020001000325702035203515753184210001000200020354211100110000731671117812000100020362036203620362036
100420351518611000173525200020001000325702035203515753184210001000200020354211100110000731671117812000100020362036203620362036
10042035160611000173525200020001000325702035203515753184210001000200020354211100110000731671117812000100020362036203620362036
100420351502511000173525200020001000325702035203515753184210001000200020354211100110000731671117812000100020362036203620362036
100420351501771000173525200020001000325702035203515753184210001000200020354211100110000731671117812000100020362036203620362036
10042035150611000173525200020001000325702035203515753184210001000200020354211100110000731671117812000100020362036203620362036
10042035150611000173525200020001000325702035203515753184210001000200020354211100110006731671117812000100020362036203620362036

Test 2: Latency 1->2

Code:

  add w0, w0, w1, asr #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)18191e1f3f4c4d51schedule 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)accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102042003515000000468100001980325201002010010100185342049169552003520035184293187001010010200202002003542111020110099100101001000000710259221979120000101002003620036200362003620036
102042003515000000145100001980325201002010010100185342049169552003520035184293187001010010200202002003542111020110099100101001000000710259221979120000101002003620036200362003620036
10204200351500000061100001980325201002010010100185342049169552003520035184293187001010010200202002003542111020110099100101001000100710259221979120000101002003620036200362003620036
102042003515000000124100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000000710259221979120000101002003620036200362003620036
10204200351500000061100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000000710259221979120000101002003620036200362003620036
102042003515000000272100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000000710259221979120000101002003620036200362003620036
102042003515000000103100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000000710259221979120000101002003620036200362003620036
102042003515000000544100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000000710259221979120000101002003620036200362003620036
102042003515000000481100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000000710259221979120000101002003620036200362003620036
102042003515000000447100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000100710259221979120000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)03l2 tlb miss data (0b)1e3a3f4c4d51schedule 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 miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100242003515000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000000640363321979220000100102003620036200362003620036
100242003515000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000000640263221979220000100102003620036200362003620036
100242003515000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000000640267321979220000100102003620036200362003620036
1002420035150000525100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010200000640271341979220000100102003620036200362003620036
1002420035150000456100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000020430640363321979220000100102003620036200362003620036
1002420035150000325100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000000640263321979220000100102003620036200362003620036
1002420035150000126100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000000640263321979220000100102003620036200362003620036
10024200351500002209100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000200640263221982820000100102003620036200362008220036
1002420080150100250100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000000640263321979220000100102003620036200362003620036
100242003515000084100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000000640263321979220000100102003620036200362003620036

Test 3: Latency 1->3

Code:

  add w0, w1, w0, asr #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)0309l2 tlb miss data (0b)3f4c4d51schedule 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)c2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020420035150001451000019803252010020100101001853420491695520035200351842931870010100102002020020035421110201100991001010010000710259111979120000101002003620036200362003620036
1020420035150003741000019803252010020100101001853420491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
1020420035150001881000019803252010020100101001853420491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
102042003515000841000019803252010020125101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
102042003515000611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010010710159111979120000101002003620036200362003620036
102042003515000821000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
1020420035150001471000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
1020420035150001261000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
102042003515001611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036
1020420035150004761000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000710159111979120000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3f4c4d51schedule 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)st unit uop (a7)l1d cache writeback (a8)a9acc2branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002420035150000000105100001974325200102001010010185310491695520035200351845131871810010100202002020035421110022109101001010000000000640463321979220000100102003620036200362003620036
1002420035150000000124100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000000000640263321979220000100102003620036200362003620036
1002420035150000000126100001974325200102005810010185310491695520035200351845131871810010100202002020035421110021109101001010000000000640263421979220000100102003620036200362003620036
1002420035150000000126100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000000000640263421979220000100102003620036200362003620036
1002420035150000000105100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000000000663263421979220000100102003620036200362003620036
1002420035150000000655100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000000000640263321979220000100102003620036200362003620036
1002420035149000000126100001974325200102001010305185310491695520035200351845131871810010100202002020035421110021109101001010000000000640263321979220000100102003620036200362003620036
1002420035150000000126100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000000000640263421979220000100102003620036200362003620036
100242003515000000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000000000640263421979220000100102003620036200362003620036
100242003515000000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000000000640263421979220000100102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  add w0, w8, w9, asr #17
  add w1, w8, w9, asr #17
  add w2, w8, w9, asr #17
  add w3, w8, w9, asr #17
  add w4, w8, w9, asr #17
  add w5, w8, w9, asr #17
  add w6, w8, w9, asr #17
  add w7, w8, w9, asr #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)031e3a3f4c4d51schedule 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020426768200006180000260942516010016010080100164318149236452672526725166153166778010080200160200267253921802011009910080100100000051102220126717160000801002672626726267262672626726
8020426725200006180000260942516010016010080100164318149236452672526725166153166778010080200160200267253911802011009910080100100000051101221126717160000801002672626726267262672626726
802042672520034806180000260942516010016010080100164318149236452672526725166153166778010080200160200267253911802011009910080100100001051101221126717160000801002672626726267262672626726
802042672520000296680000260942516010016010080100164318149236452672526725166153166778010080200160200267253911802011009910080100100000051101221126717160000801002672626726267262672626726
80204267252000061800002609425160100160100801001643181492364526725267251661518166778010080200160200267853911802011009910080100100000051101221126717160000801002672626726267262672626726
80204267252000139380082260945016010016010080100168174149236452672526725166153166778010080200160200267253911802011009910080100100000051101221126717160000801002672626726267262672626726
8020426725200006180000260942516010016010080100164318149236452672526725166153166778010080200160200267253911802011009910080100100000051101221126717160000801002672626726267262672626726
80204267252000072680000260942516010016010080100164318149236452672526725166153166778010080200160200267253911802011009910080100100000351101221126717160000801002672626726267262672626726
8020426784200144010380084260942516010016010080327164318149236452672526725166173166778010080200160200267253911802011009910080100100000351101221126717160000801002672626726267262672626726
80204267252001206180000260942516010016010080100164318149236452672526725166153166778010080200160200267253911802011009910080100100000051101221126717160000801002672626726267262672626726

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss data (0b)18191e1f3a3f4c4d51schedule 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)st unit uop (a7)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)d9daddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80024267342010000000006180000212802516001016001080010163142014923631267112671116623316685800108002016002026711391180021109108001010000000005020622804426704160000800102671226712267122671226712
80024267112000000000001248000021280251600101600108001016314200492363126711267111662331668580010800201600202671139118002110910800101000000082605020522904426704160000800102671226712267122671226712
80024267112000000000006180000212802516001016001080010163142004923631267112671116623316685800108002016002026711391180021109108001010000000005020622906626704160000800102671226712267122671226712
80024267112000000000006180000212802516001016001080010163142004923631267112671116623316685800108002016002026711391180021109108001010000000005020522806726704160000800102671226712267122671226712
80024267112000000000006180000212802516001016001080010163142014923631267112671116623316685800108002016002026711391180021109108001010000000005020622806626704160000800102671226712267122671226712
80024267112000000000006180000212802516001016001080010163142014923631267112671116623316685800108002016002026711391180021109108001010000000005020622905526704160000800102671226712267122671226712
80024267692000000000006180000212802516001016001080010163142014923631267112671116623316685800108002016002026711391180021109108001010000000005020622805526704160000800102696926712267122671226712
80024267112000000000006180000212802516001016001080010163142014923631267112671116623316685800108002016002026711391180021109108001010000000005020722906526704160000800102671226712267122671226712
80024267112000000000006180000212802516001016001080010163142004923631267112671116623316685800108002016002026711391180021109108001010000000005020522905626704160000800102671226712267122671226712
80024267112000000000006180000212802516001016001080010163142014923631267112671116623316685800108002016002026711391180021109108001010000000005020622906626704160000800102671226712267122671226712