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

Test 1: uops

Code:

  sub w0, w0, w1, sxtb
  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)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1004203515061100017352520002000100032570020352035157531842100010002000203542111001100000731671117812000100020362036203620362036
1004203515061100017352520002000100032570020352035157531842100010002000203542111001100003731671117812000100020362036203620362036
1004203515061100017352520002000100032570020352035157531842100010002000203542111001100003731671117812000100020362036203620362036
1004203515061100017352520002000100032570020352035157531842100010002000203542111001100000731671117812000100020362036203620362036
10042035150611000173525200020001000325700203520351575318421000100020002035421110011000018731671117812000100020362036203620362036
1004203515061100017352520002000100032570020352035157531842100010002000203542111001100000731671117812000100020362036203620362036
1004203515061100017352520002000100032570020352035157531842100010002000203542111001100000731671117812000100020362036203620362036
10042035150344100017352520002000100032570020352035157531842100010002000203542111001100000731671117812000100020362036203620362072
1004203515061100017352520002000100032570020352035157531842100010002000203542111001100000731671117812000100020362036203620362036
10042035150187100017352520002000100032570020352035157531842100010002000203542111001100000731671117812000100020362036203620362036

Test 2: Latency 1->2

Code:

  sub w0, w0, w1, sxtb
  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)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
10204200351490061100001980325201002010010100185342049169552003520035184293187001010010200202002003542111020110099100101001000000710259111979120000101002003620036200362003620036
102042007815000130100001980325201002010010100185342049169552003520035184293187001010010200202002003542111020110099100101001000010710159111979120000101002003620036200362003620036
10204200351500061100001980325201002010010100185342049169552003520035184293187001010010200202002003542111020110099100101001000000710159111979120000101002003620036200362003620036
102042003515001261100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000050710159111979120000101002003620036200362003620036
10204200351500961100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000000710159111979120000101002003620036200362003620036
10204200351500061100001980325201002010010100185342049169552003520035184293187001010010200202002003542111020110099100101001000000710159111979120000101002003620036200362003620036
10204200351500961100001980325201002010010100185342049169552003520035184293187001010010200202002003542111020110099100101001000000710159111979120000101002003620036200362003620036
10204200351500061100001980325201002010010100185342049169552003520035184293187001010010200202002003542111020110099100101001000000710159111979120000101002003620036200362003620036
102042003515000441100001980325201002010010100185342049169552003520035184293187001010010200202002003542111020110099100101001000000710159111979120000101002003620036200362003620036
10204200351500061100001980325201002010010100185342149169552003520035184293187001010010200202002003542111020110099100101001000000710159111979120000101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code): 2.0035

retire uop (01)cycle (02)03l2 tlb miss data (0b)1e3f4c4d51schedule 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 cache writeback (a8)acbranch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100242003514900611000019743252001020010100101853101491695502003520035184513187181001010020200202003542111002110910100101003200640263221979220000100102003620036200362003620036
10024200351500061100001974325200102001010010185310149169550200352003518451318718100101002020020200354211100211091010010100000640263221979220000100102003620036200362003620036
100242003515000611000019743252001020010100101853100491695502003520035184513187181001010020200202003542111002110910100101001180640263221979220000100102003620036200362003620036
10024200351500061100001974325200102001010010185310149169550200352003518451318718100101002020020200354211100211091010010100900640263221979220000100102003620036200362003620036
10024200351500061100001974325200102001010010185310149169550200352003518451318718100101002020020200354211100211091010010100461260640263221979220000100102003620036200362003620036
10024200351500061100001974325200102001010010185310149169550200352003518451318718100101002020020200354211100211091010010102030640263221979220000100102003620036200362003620036
10024200351500061100001974325200102001010010185310049169550200352003518451318713100101002020020200354211100211091010010100000640263221979220000100102003620036200362003620036
10024200351500061100001974325200102001010010185310049169550200352003518451318718100101002020020200354211100211091010010100000640263221979220000100102003620036200362003620036
10024200351500061100001974325200102001010010185310149169550200352003518451318718100101002020020200354211100211091010010100090640263221979220000100102003620036200362003620036
100242003515000611000019743252001020010100101853101491695532003520035184513187181001010020200202003542111002110910100101001120640263221979220000100102003620036200362003620036

Test 3: Latency 1->3

Code:

  sub w0, w1, w0, sxtb
  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)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)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102042003515000611000019797252012520125102521853421491695520035200351842931870010100102002020020035421110201100991001010010000070710359111979120000101002003620036200362003620036
1020420035150006110000198032520100201001010018534204916955200352003518429318700101001020020200200354211102011009910010100100000072710159111979120000101002003620036200362003620036
102042003515000611000019803252010020100101251853160491695520035200351843531870010125102002020020035441110201100991001010010000000710159111979120000101002003620036200362003620036
10204200351500072610000198032520100201001010018534204916955200352003518429318700101001020020200200354411102011009910010100100000018710159111979120000101002003620036200362003620036
102042003515010611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
102042003515000611000019803252010020100101001853420491695520035200351842931870010100102002020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
102042003515000611000019803252010020100101001853421491695520035200351842931870010100102002020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
1020420035150036611000019803252010020100101001853420491695520035200351842931870010100102002020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
102042003515000611000019803252010020100101001853421491695520035200351842931875510100102002020020035421110201100991001010010000000710159111979120000101002003620036200362003620036
102042003515010313100001980325201002010010125185316049169552003520035184353187001010010200202002003542111020110099100101001000001615710159111979120000101002003620036200362003620036

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)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10024200351500726100001974325200102001010010185310149169552003520035184513187181001010020200202003542111002110910100101010640363221979220000100102003620036200362003620036
100242003515018611000019743252001020010100101853101491695520035200351845131871810010100202002020035421110021109101001010463640263221979220000100102003620036200362003620036
1002420035149061100001974325200102001010010185310149169552003520035184513187181001010020200202003542111002110910100101000640263221979220000100102003620036200362003620036
1002420035150061100001974325200102001010010185310149169552003520035184513187181001010020200202003542111002110910100101016640263221979220000100102003620036200362003620036
1002420035150061100001974325200102001010010185310049169552003520035184513187181001010020200202003542111002110910100101000640263221979220000100102003620036200362003620036
1002420035150061100001974325200102001010010185310049169552003520035184513187181001010020200202003542111002110910100101000640263221979220000100102003620036200362003620036
1002420035150061100001974325200102001010010185310149169552003520035184513187181001010020200202003542111002110910100101003640263221979220000100102003620036200362003620036
1002420035149061100001974325200102001010010185310149169552003520035184513187181001010020200202003542111002110910100101013640263221979220000100102003620036200362003620036
1002420035150061100001974325200102001010010185310149169552003520035184513187181001010020200202003542111002110910100101000640263221979220000100102003620036200362003620036
1002420035150061100001974325200102001010010185310149169552003520035184513187181001010020200202003542111002110910100101000640263221979220000100102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  sub w0, w8, w9, sxtb
  sub w1, w8, w9, sxtb
  sub w2, w8, w9, sxtb
  sub w3, w8, w9, sxtb
  sub w4, w8, w9, sxtb
  sub w5, w8, w9, sxtb
  sub w6, w8, w9, sxtb
  sub w7, w8, w9, sxtb
  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)03mmu table walk instruction (07)l2 tlb miss instruction (0a)18191e1f3f4c4d51schedule 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 tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802042673220100000061800002609425160100160100801001643180492364526725267251661503166778010080200160200267253911802011009910080100100000000051105221226717160000801002672626726267262672626726
8020426725200000000251800002609425160100160100801001643180492364526725267251661503166778010080200160200267253911802011009910080100100000000051101221126717160000801002672626726267262672626726
8020426725200000000536800002609425160100160100801001643181492364526725267251661503166778010080200160200267253911802011009910080100100000000051101221126717160000801002672626726267262672626726
802042672520000000061800002609425160100160100801001643181492364526725267251661503166778010080200160200267253911802011009910080100100000000051101221126717160000801002672626726267262672626726
802042672520000000061800002609425160100160100801001643180492364526725267251661503166778010080200160200267253911802011009910080100100000000051101221126717160000801002672626726267262672626785
802042672520000000061800002609425160100160100801001643181492370526725267251661503166778010080200160200267253911802011009910080100100000000051101221126717160000801002672626726267262672626726
8020426725200000000726800002609425160100160100801001643181492364526725267251661503166778010080200160200267253911802011009910080100100000000051101221126717160000801002672626726267262672626726
80204267252000000150170800002609425160100160100801001643181492364526725267251661503166778010080200160200267253911802011009910080100100000000051101221126717160000801002672626726267262672626726
802042672520000000061800002609425160100160100801001643181492364526725267251661503166778010080200160200267253911802011009910080100100000000051101221126717160000801002672626726267262672626726
802042672520000000061800002609425160100160100801001643181492364526725267251661503166778010080200160200267253911802011009910080100100000000051101221126717160000801002672626726267262672626726

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e1f3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)5f6067696a6b6d6emap 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)accfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dbddfetch restart (de)e0? int output thing (e9)ea? int retires (ef)f5f6f7f8fd
80024267352000061800002128025160010160010800101631420004923631026711267111662331668580010800201600202671139118002110910800101047050200005220055267041600000800102671226712267122671226712
8002426711200006180000212802516001016001080010163142000492363102671126711166233166858001080020160020267113911800211091080010101050200005220033267041600000800102671226712267122671226712
8002426711200006180000210532516001016001080010163142000492363102671126711166233166858001080020160020267113911800211091080010104050200004220043267041600000800102671226712267122671226712
8002426711200006180000212802516001016001080010163142000492363102671126711166233166858001080424160020267113911800211091080010102050200002220034267041600000800102671226712267122671226712
8002426711200006180000212802516001016001080010163142010492363102671126711166233166858001080020160020267113911800211091080010101050200004220024267041600000800102671226712267122671226712
8002426711200006180000212802516001016001080010163142010492363102671126711166233166858001080020160020267113911800211091080010101050200004220043267041600000800102671226712267122671226712
8002426711200006180000212802516001016001080010163142010492363132671126711166233166858001080020160020267113911800211091080010101050200003220034267041600000800102671226712267122671226830
8002426711200006180000212802516001016001080010163142010492369002671126711166233166858001080020160020267113911800211091080010102050200004220045267041600000800102671226712267122671226712
8002426711200006780000212802516001016001080010163142010492363102671126711166233166858001080020160020267113911800211091080010101050200003220033267041600000800102671226712267122671226712
8002426711200006180000212802516001016001080010163142010492363102671126711166233166858001080020160020267113911800211091080010101050200003220034267041600000800102671226712267122671226712