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

SUB (sxth, 32-bit)

Test 1: uops

Code:

  sub w0, w0, w1, sxth
  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)03181e3f4c4d51schedule 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)a9accfd5map dispatch bubble (d6)daddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1004203515006110001735252000200010003257002035203515753184210001000200020354211100110000007316701117812000100020362036203620362036
1004203515006110001735252000200010003257012035203515753184210001000200020354211100110000007316701117812000100020362036203620362036
1004203516006110001735252000200010003257012035203515753184210001000200020354211100110000007316701120322000100020362036203620362059
1004203516006110001735252000200010003257002035203515753184210001000200020354211100110000007316701117812000100020362036203620362036
1004203515096110001735252000200010003257002035203515753184210001000200020354211100110000007316701117812000100020362036203620362036
1004203515008410001735252000200010003257012035203515753184210001000200020354211100110000007316701117812000100020362036203620362036
1004203515036110001735252000200010003257012035203515753184210001000200020354211100110000007316701117812000100020362036203620362036
10042035150010310001735252000200010003257012035203515753184210001000200020354211100110000407316701117812000100020362036203620362036
1004203517008210001735252000200010003257012035203515753184210001000200020354211100110000007316701117812000100020362036203620362036
1004203515008410001735252000200010003257012035203515753184210001000200020354211100110001007316701117812000100020362036203620362036

Test 2: Latency 1->2

Code:

  sub w0, w0, w1, sxth
  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)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)9fl1d cache writeback (a8)a9acbranch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020420035149006110000198032520100201001010018534249169552003520035184293187001010010200202002003542111020110099100101001000000710159111979120000101002003620036200362003620036
1020420035151008410000198032520100201001010018534249169552003520035184293187001010010200202002003542111020110099100101001000000710159111979120000101002003620036200362003620036
1020420035150006110000198032520100201001010018534249169552003520035184293187001010010200202002003542111020110099100101001000000710159111979120000101002003620036200362003620036
1020420035150006110000198032520100201001010018534249169552003520035184293187001010010200202002003542111020110099100101001000000710159111979120000101002003620036200362003620036
1020420035150006110000198032520100201001010018534249169552003520035184293187001010010200202002003542111020110099100101001000000710159111979120000101002003620036200362003620036
1020420035150006110000198032520100201001010018534249169552003520035184293187001010010200215442003542111020110099100101001000000710159111979120000101002003620036200362003620036
1020420035150006110000198032520100201001010018534249169552003520035184293187001010010200202002003542111020110099100101001000000710159111979120000101002003620036200362003620036
1020420035150008210000198032520100201001010018534249169552003520035184293187001010010200202002003542111020110099100101001000000710159111979120000101002003620036200362003620036
1020420035150006110000198032520100201001010018534249169552003520035184293187001010010200202002003542111020110099100101001000000710159111979120000101002003620036200362003620036
10204200351500012410000198032520100201001010018534249169552003520035184293187001010010200202002003542111020110099100101001000000710159111979120000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)03mmu table walk instruction (07)l2 tlb miss data (0b)191e1f3f4c4d51schedule 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)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002420035150000450251100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036
10024200351500000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036
10024200351501000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036
1002420035150000153061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036
10024200351500003061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036
1002420035150000510536100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036
10024200351500000061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036
100242003515000027061100001974325200102001010156185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036
1002420035150000312061100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036
10024200351500004290103100001974325200102001010010185310491695520035200351845131871810010100202002020035421110021109101001010000640263221979220000100102003620036200362003620036

Test 3: Latency 1->3

Code:

  sub w0, w1, w0, sxth
  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)l2 tlb miss data (0b)18191e3f4c4d51schedule 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)accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102042003515000000313100001980325201002010010100185342491695520035200351842931870010100102002020020035421110201100991001010010000000712159111979120000101002003620036200362003620036
10204200351500000061100001980325201002010010100185342491695520035200351842931870010100102002020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
10204200351501100061100001980325201002010010100185342491695520035200351842931870010100102002020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
10204200351500000061100001980325201002010010100185342491695520035200351842931870010100102002020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
102042003515000000124100001980325201002010010100185342491695520035200351842931870010100102002020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
10204200351500000061100001980325201002010010100185342491695520035200351842931870010100102002020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
102042003515000000166100001980325201002010010100185342491695520035200351842931870010100102002020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
10204200351500000061100001980325201002010010100185342491695520035200351842931870010100102002020020035421110201100991001010010000130710159111979120000101002003620036200362003620036
10204200351500020061100001980325201002010010100185342491695520035200351842931870010100102002020020035421110201100991001010010000000710159111979120000101002008220082200362003620036
10204200351500000061100001980325201002010010100185342491695520035200351842931870010100102002020020035421110201100991001010010000000733159111983020000101002003620036200362003620036

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)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)9fcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100242003515006110000197432520010200101001018531004916955020035200351845131871810010100202002020035421110021109101001010640463341979220000100102003620036200362003620036
100242003515036110000197432520010200101001018531014916955020035200351845131871810010100202002020035421110021109101001010640463431979220000100102003620036200362003620036
1002420035150666110000197432520010200101001018531014916955020035200351845131871810010100202002020035421110021109101001010684363441979220000100102003620036200362003620036
1002420035150126110000197432520010200101001018531014916955020035200351845131871810010100202002020035421110021109101001010640363431979220000100102003620036200362003620036
100242003515006110000197432520010200101001018531004916955020035200351845131871810010100202042820035421110021109101001010640363431988220000100102003620036200362003620036
1002420035150636110000197432520010200101001018531014916955020035200351845131871810010100202002020035421110021109101001010640263231979220000100102003620036200362003620036
100242003515006110000197432520010200101001018531004916955020035200351845131871810010100202002020035421110021109101001010640463341979220000100102003620036200362003620036
100242003515006110000197432520010200101001018531014916955020035200351845131871810010100202002020035421110021109101001010640363431979220000100102003620036200362003620036
100242003514906110000197432520010200101001018531014916955020035200351845131871810010100202002020035421110021109101001010640463431979220000100102003620036200362003620036
1002420035150186110000197432520010200101001018531004916955020035200351845131871810010100202002020035421110021109101001010640363431979220000100102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  sub w0, w8, w9, sxth
  sub w1, w8, w9, sxth
  sub w2, w8, w9, sxth
  sub w3, w8, w9, sxth
  sub w4, w8, w9, sxth
  sub w5, w8, w9, sxth
  sub w6, w8, w9, sxth
  sub w7, w8, w9, sxth
  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 tlb miss (a1)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020426751201061800002609425160100160100801001643180492364526725267251661531667780100802001602002672539118020110099100801001000051103221126717160000801002672626726267262672626726
8020426725200061800002609425160100160100801001643181492364526725267251661531667780100802001602002672539118020110099100801001000051101221126717160000801002672626726267262672626726
8020426725200061800002609425160100160100801001643180492364526725267251661531667780100802001602002695939118020110099100801001000051101221126717160000801002672626726267262672626726
80204267252000189800002609425160100160100801001643180492364526725267251661531667780100802001602002672539118020110099100801001000051101221126717160000801002672626726267262672626726
8020426725200061800002609425160100160100801001643180492364526725267251661531667780100802001602002672539118020110099100801001000051101221126717160000801002672626726267262672626726
80204267252000618000026094251601001601008010016431804923645267252672516615261667780100802001602002672539118020110099100801001000051101221126717160000801002672626726267262672626726
8020426725200061800002609425160100160100801001643180492364526725267251661531667780100802001602002672539118020110099100801001000051101221126717160000801002672626726267262672626726
80204267252000239800002609425160100160100801001643180492364526725267251661531670580100802001602002672539118020110099100801001002051101221126717160000801002672626726267262672626726
802042672520022561800002609425160100160100801001643180492364526725267251661531667780100802001602002672539118020110099100801001000051101221126717160000801002672626726267262672626726
80204267252000631800002609425160100160100801001643180492364526725267251661531667780100802001602002672539118020110099100801001000051101221126717160000801002672626726267262672626726

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)1e3f4c4d51schedule 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 miss (a1)cfd5map dispatch bubble (d6)daddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800242673520004261800002128025160010160010800101631420049236312671126711166233166848001280020160020267114011800211091080010100502072207526704160000800102671226712267122671226712
80024267112000961800002128025160012160012800121631420149236312671126711166233166848001080020160020267113911800211091080010101502452205726704160000800102671226712267122671226712
80024267112000061800002128025160010160010800101638060049236312671126711166233166858001080020160020267113911800211091080010100502072205726704160000800102671226712267122671226712
800242671120001861800002128025160010160010800101631420049236312671126711166233166858001080020160020267113911800211091080010100502072205726704160000800102671226712267122671226712
8002426711200032161800002128025160010160010800101631420049236312671126711166233166858001080020160020267113911800211091080010100502052205726704160000800102671226712267122671226712
800242671119902761800002128025160010160010800101631420049236312671126711166233166858001080020160020267113911800211091080010100502072207726704160000800102671226712267122671226712
800242671120002461800002128025160010160012800121640070149236312671126711166233166858001080020160020267113911800211091080010100502052207726704160000800102671226712267122671226712
800242671120007861800002128025160010160010800101631420049236312671126711166223166858001080020160020267113911800211091080010100502272207526704160000800102671226712267122671226712
800242671120003361800002128025160010160012800101631420049236312671126711166233166858001280020160020267113911800211091080010100502272207726704160000800102671226712267122671226712
80024267112000061800002128025160010160010800101631420049236312671126711166233166858001080020160020267113911800211091080010100502052207726704160000800102671226712267122671226712