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

Test 1: uops

Code:

  add w0, w0, w1, uxth
  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)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)ld unit uop (a6)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100420351506110001735252000200010003257012035203515753184210001000200020354211100110000063731671117812000100020362036203620362036
10042035156611000173525200020001000325701203520351575318421000100020002035421110011000000731671117812000100020362036203620362036
10042035150611000173525200020001000325700203520351575318421000100020002035421110011000000731671117812000100020362036203620362036
10042035150611000173525200020001000325700203520351575318421000100020002035421110011000000731671117812000100020362036203620362036
10042035150611000173525200020001000325701203520351575318421000100020002035421110011000006731671117812000100020362036203620362036
10042035160611000173525200020001000325701203520351575318421000100020002035421110011000000731671117812000100020362036203620362036
10042035160611000173525200020001000325701203520351575318421000100020002035421110011000000731671117812000100020362036203620362036
100420351501321000173525200020001000325701203520351575318421000100020002035421110011000000731671117812000100020362036203620362036
10042035150611000173525200020001000325701203520351575318421000100020002035421110011000000731671117812000100020362036203620362036
10042035160611000173525200020001000325701203520351575318421000100020002035421110011000006731671117812000100020362036203620362036

Test 2: Latency 1->2

Code:

  add w0, w0, w1, uxth
  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)03181e3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)696a6b6d6emap 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)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020420035150006110000198032520100201001011118498549169550200352003518477718735101111023220264200354211102011009910010100100000111720161984520000101002003620036200362003620036
1020420035150006110000198032520100201001011118498549169550200352003518477718735101111023220264200354211102011009910010100100000111720161984520000101002003620036200362003620036
10204200351500666110000198032520100201001011118498549169550200352003518477718735101111023220264200354211102011009910010100100000111720161984520000101002003620036200362003620036
1020420035150066110000198032520100201001027618498549169550200352003518477718735101111023220264200354211102011009910010100100000111720161984520000101002003620036200362003620036
10204200351500246110000198032520100201001011118498549169550200352003518477718735101111023220264200354211102011009910010100100000111720161984520000101002003620036200362003620036
102042003515004056110000198032520100201001011118498549169550200352003518477718736101111023220264200354211102011009910010100100000111720161984520000101002003620036200362003620036
10204200351500186110000198032520100201001011118498549169550200352003518477718735101111023220264200354211102011009910010100100000111720161984520000101002003620036200362003620036
10204200351500246110000198032520100201001011118498549169550200352003518477718735101111023220264200354211102011009910010100100000111720161984520000101002003620036200362003620036
1020420035150006110000198032520100201001011118498549169550200352003518477718735101111023220264200354211102011009910010100100000111720161984520000101002003620036200362003620036
1020420035150006110000198032520100201001011118498549169550200352003518477618735101111023220264200354211102011009910010100100000111720161984520000101002003620036200362003620036

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)1e3f4c4d51schedule 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)9facc2branch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10024200351500033482100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640363331979220000100102003620036200362003620036
100242003515000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640363331979220000100102003620036200362003620036
100242003515000061100001974125200102001210010185310491695520035200351845131871810010100202002020035421110021109101001010000640363331979220000100102003620036200362003620036
1002420035150002461100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000642363331979220000100102003620036200362003620036
100242003515000061100001974346200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640363331979220000100102003620036200362003620036
100242003515000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640363331979220000100102003620036200362003620036
1002420035150000103100001974325200102001010167185310491695520035200351845131871810010100202002020035421110021109101001010000640363331979220000100102003620036200362003620036
100242003515000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640363331979220000100102003620036200362003620036
100242003515000061100001974325200122001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640363331979220000100102003620036200362003620036
1002420035150002161100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640363331979220000100102003620036200362003620036

Test 3: Latency 1->3

Code:

  add w0, w1, w0, uxth
  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)acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102042003515054611000019803252010020100101111849850491695520035200351847771873510111102322026420035421110201100991001010010000011172016001984520000101002003620036200362003620036
10204200351500611000019803252010020100101111849850491695520035200351847771873510111102322026420035421110201100991001010010000011172016001984520000101002003620036200362003620036
10204200351500611000019803252010020100101111849850491695520035200351847771873510111102322026420035421110201100991001010010000011172016001984520000101002003620036200362003620036
10204200351493611000019803252010020100101111849850491695520035200351847771873510111102322026420035421110201100991001010010000011172016001984420000101002003620036200362003620036
10204200351500611000019803252010020100101111849851491695520035200351847771873610111102322026420035421110201100991001010010000011172016001984520000101002003620036200362003620036
102042003515005361000019803252010020100101111849851491695520035200351847771873610111102322026420035421110201100991001010010000011172016001984520000101002003620036200362003620036
10204200351500611000019803252010020100101111849850491695520035200351847771873510111102322026420035421110201100991001010010000011172016001984520000101002003620036200362003620036
10204200351500611000019803252010020100101111849850491695520035200351847771873510111102322026420035421110201100991001010010000011172016001984520000101002003620036200362003620036
10204200351500611000019803252010020100101111849850491695520035200351847771873510111102322026420035421110201100991001010010000011172016001984520000101002003620036200362003620036
102042003515021611000019803252010020100101111849851491695520035200351847771873510111102322026420035421110201100991001010010000011172016001984520000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)0309l2 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 cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002420035150000018061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640363221979220000100102003620036200362003620036
100242003515000000061100001975025200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036
100242003515000000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036
100242003515000000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036
1002420035150000018061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036
100242003515000000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036
1002420035150000021061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036
100242003515000000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036
100242003515000000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036
100242003515000000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  add w0, w8, w9, uxth
  add w1, w8, w9, uxth
  add w2, w8, w9, uxth
  add w3, w8, w9, uxth
  add w4, w8, w9, uxth
  add w5, w8, w9, uxth
  add w6, w8, w9, uxth
  add w7, w8, w9, uxth
  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)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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020426768201061800002609425160100160100801001643181492364526725267251661531667780100802001602002672539118020110099100801001000051103222226717160000801002672626726267262672626726
802042672520007268000026094251601001601008010016431814923645267252672516615316677801008020016020026725391180201100991008010010000511022763226717160000801002672626726267262672626726
80204267252000131800002609425160100160100801001643181492364526725267251661531668480100802001602002672539118020110099100801001000051102222226717160000801002672626726267262672626726
8020426725200047480000260942516010016010080100164318149236452672526725166153166778010080200160634267253911802011009910080100100018351102222226717160000801002672626726267262672626726
80204267252000726800002609425160100160100801001643181492364526725267251661531667780100802001602002672539118020110099100801001000051102222226717160000801002672626726267262672626726
80204267252000251800002609425160100160100801001643181492364526725267251661531667780458802001602002672539118020110099100801001000051102222226717161132801002672626726267262672626726
802042672520012393800002609475160100160100801001643180492364526725267251661531667782011802001602002672539418020110099100801001001351102562226717160000801002672626726267262672626726
8020426725200061800002609425160100160100801001643180492364526725267251661531667780100802001602002672539118020110099100801001000051102222226717160000801002672626726267262672626726
802042672520012251800002609425160100160100801001643181492364526725267251661531667780100802001602002672539118020110099100801001001051102222226717160000801002672626726267262672626726
80204267252000293800002609425160100160100801001643181492364526725267251661531667780100802001602002672539118020110099100801001000351102222226717160000801002672626726267262672626726

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l2 tlb miss data (0b)181f3f4c4d51schedule 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800242671720000061800002128025160010160010800101631420149236312671126711166233166858001080020160020267113911800211091080010100002050209226426704160000800102671226712267122671226712
800242671120000061800002128025160010160010800101631420149236312671126711166233166858001080020160020267113911800211091080010100000050204224626704160000800102671226712267122671226712
800242671120000061800002128025160010160010800101631420149236312671126711166233166858001080020160020267113911800211091080010100000050208227526704160000800102671226712267122671226712
8002426711200000618000021280251600101600108001016314201492363126711267111662331668580010800201600202671139118002110910800101000027250206228526704160000800102671226712267122671226712
8002426711200000618000021280251600101600108001016314201492363126711267111662331668580010800201600202671139118002110910800101000041050207227526704160000800102671226712267122671226712
800242671120000061800002128025160010160010800101631420149236312671126711166233166858001080020160020267113911800211091080010100000050205224626704160000800102671226712267122671226712
800242671120000061800002128025160010160010800101631420149236312671126711166233166858001080020160020267113911800211091080010100001050206227726704160000800102671226712267122671226712
800242671120000061800002128025160010160010800101631420149236312671126711166233166858001080020160020267113911800211091080010100000050206224626704160000800102671226712267122671226712
800242671120000061800002128025160010160010800101631421149236312671126711166233166858001080020160020267113911800211091080010100000350207226426704160000800102671226712267122671226712
800242671120000061800002128025160010160010800101631420149236312671126711166233166858001080020160020267113911800211091080010100000050206225626704160000800102671226712267122671226712