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

SBC (64-bit)

Test 1: uops

Code:

  sbc x0, x0, x1
  mov x0, 1
  mov x1, 2

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 1.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)031e3f4d51schedule 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)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1004103580619172510001000100062250103510358053882100010003000103510411100110000073127119901000100010361036103610361036
1004103580619172510001000100062250103510358053882100010003000103510411100110000073127119901000100010361036103610361036
1004103580619172510001000100062250103510358053882100010003000103510411100110000073127119901000100010361036103610361036
1004103580619172510001000100062250103510358053882100010003000103510411100110000073127119901000100010361036103610361036
1004103589619172510001000100062250103510358053882100010003000103510411100110000073127119901000100010361036103610361036
1004103580619172510001000100062250103510358053882100010003000103510411100110002073127119901000100010361036103610361036
1004103570619172510001000100062250103510358053882100010003000103510411100110001073127119901000100010361036103610361036
1004103580619172510001000100062250103510358053882100010003000103510411100110000073127119901000100010361036103610361036
1004103580619172510001000100062250103510358053882100010003000103510411100110000073127119901000100010361036103610361036
1004103570619172510001000100062250103510358053882100010003000103510411100110000073127119901000100010361036103610361036

Test 2: Latency 1->2

Code:

  sbc x0, x0, x1
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03mmu table walk data (08)1e1f3f4d51schedule 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)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102041003575027061992025101001010010100647152149695510035100358656387321010010200302001003510211102011009910010100100000071012711999210000101001003610036100361003610036
10204100357500061992025101001010010100647152149695510035100358656387321010010200302001003510211102011009910010100100000371012711999210000101001003610036100361003610036
10204100357500061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100100000071012711999210000101001003610036100361003610036
10204100357500061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100100000071012711999210000101001003610036100361003610036
10204100357500061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100100000071012711999210000101001003610036100361003610036
102041003575000619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001000005471012711999210000101001003610036100361003610036
10204100357500061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100100000071012711999210000101001003610036100361003610036
10204100357500061992025101001010010100647152149695510035100358656387321010010200302001003510211102011009910010100100000071012711999210000101001003610036100361003610036
10204100357500061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100100000071012711999210000101001003610036100361003610036
102041003575027061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100100000071012711999210000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)031e3f4d51schedule 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)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10024100357506199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036
10024100357506199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036
10024100357596199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036
100241003575366199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036
10024100357596199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036
10024100357506199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036
100241003575062999182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036
100241003575017099182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036
10024100357506199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036
10024100357506199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010064022722999310000100101003610036100361003610036

Test 3: Latency 1->3

Code:

  sbc x0, x1, x0
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03mmu table walk data (08)191e1f3f4d51schedule 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
1020410035750000619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001000071012711999210000101001003610036100361003610036
102041003575000013699202510100101001010064715214969551003510035865638732101001029830200100351021110201100991001010010003071012711999210000101001003610036100361003610036
1020410035750000619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001000371012711999210000101001003610036100361003610036
10204101267500006199202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010002471012711999210000101001003610036100361003610036
1020410035750060619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001000971012711999210000101001003610036100361003610036
10204100357600006199202510100101001010064715204969551003510035865638732101001020030200100351021110201100991001010010001871012711999210000101001003610036100361003610036
10204100357510006199202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010002471012711999210000101001003610036100361003610036
10204100357500006199206810100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010003071014511999210000101001003610036100361003610036
102041003575000010399206410100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010004271012711999210000101001003610036100361003610036
1020410035750000619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001000071012711999210000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03l1i tlb fill (04)1e3f4d51schedule 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
10024100357502761991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100064042722999310000100101003610036100361003610036
1002410035750061991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100064022722999310000100101003610036100361003610036
1002410035750061991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100064022722999310000100101003610036100361003610036
1002410035750061991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100064022722999310000100101003610036100361003610036
10024100357509361991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100064022722999310046100101003610036100361003610036
1002410035750061991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100064022722999310000100101003610036100361003610036
10024100357500168991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100064022722999310000100101003610036100361003610036
1002410035750061991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100064022722999310000100101003610036100361003610036
10024100357502161991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100064022722999310000100101003610036100361003610036
1002410035760061991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100064022722999310000100101003610036100361003610036

Test 4: Latency 1->4

Chain cycles: 1

Code:

  sbc x0, x1, x2
  tst x0, 1
  mov x0, 1
  mov x1, 2
  mov x2, 3

(non-fused SUB/CBNZ loop)

100 unrolls and 100 iterations

Result (median cycles for code, minus 1 chain cycle): 1.0035

retire uop (01)cycle (02)0318191e1f3f4d51schedule 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 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
20204200351500012006119926252020020200202001297650491695520035200351740631748120200202004020020035104112020110099201000001310128111999220100101002003620036200362003620036
202042003515000006119926252020020200202001297650491695520035200351740631748120200202004020020035104112020110099201000001310128111999220100101002003620036200362003620036
2020420035150006606119926252020020200202001297650491695520035200351740631748120200202004020020035104112020110099201000001310128111999220100101002003620036200362003620036
202042003515000006119926252020020200202001297650491695520035200351740631748120200202004020020035104112020110099201000001310128111999220100101002003620036200362003620036
202042003515000006119926252020020200202001297650491695520035200351740631748120200202004020020035104112020110099201000001310128111999220100101002003620036200362003620036
202042003515600006119926252020020200202001297650491695520035200351740631748120200202004020020035104112020110099201000001310128111999220100101002003620036200362003620036
20204200351500000397719926252020020200202001297650491695520035200351740631748120200202004020020035104112020110099201000001310128111999220100101002003620036200362003620036
20204200351500093526119926252020020200202001297650491695520035200351740631748120200202004020020035104112020110099201000001310128111999220100101002003620036200362003620036
202042003515000006119926252020020200202001297650491695520035200351740631748120200202004020020035104112020110099201000001310128111999220100101002003620036200362003620036
202042003515000006119926252020020200202001297650491695520035200351740631748120200202004020020035104112020110099201000001310128111999220100101002003620036200362003620036

1000 unrolls and 10 iterations

Result (median cycles for code, minus 1 chain cycle): 1.0035

retire uop (01)cycle (02)03l2 tlb miss instruction (0a)18191e1f3a3f4d51schedule 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 int alu (97)l1d tlb miss (a1)l1d cache writeback (a8)acbranch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200242003515000018006719918252002020020200201297297049169552003520035174283175042002020020400202003510411200211092001000001270927981999520010100102003620036200362003620036
200242003515000000061199182520020200202002012972970491695520035200351742831750420020200204002020035104112002110920010400012709271091999520010100102003620036200362003620036
2002420035150000600611991825200202002020020129729704916955200352003517428317527200202002040020200351041120021109200100000127110278101999520010100102003620036200362003620036
2002420035150000120061199182520020200202002012972970491695520035200351742831750420020200204002020035104112002110920010000012701027981999520010100102003620036200362003620036
200242003515000000061199182520020200202002012972970491695520035200351742831750420020200204002020035104112002110920010000012701027981999520010100102003620036200362003620036
2002420035150000210061199182520020200202002012972970491695520035200351742831750420020200204002020035104112002110920010000012701027991999520010100102003620036200362003620036
2002420035150002000611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200100000127010278101999520010100102003620036200362003620036
20024200351490000006119918252002020020200201297297049169552003520035174283175042002020020400202003510411200211092001000001270927891999520010100102003620036200362003620036
20024200351500002400611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200100000127010279101999520010100102003620036200362003620036
200242003515000017100611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200100000127010271091999520010100102003620036200362003620036

Test 5: throughput

Count: 8

Code:

  sbc x0, x8, x9
  sbc x1, x8, x9
  sbc x2, x8, x9
  sbc x3, x8, x9
  sbc x4, x8, x9
  sbc x5, x8, x9
  sbc x6, x8, x9
  sbc x7, x8, x9
  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.3342

retire uop (01)cycle (02)03l2 tlb miss data (0b)1e3f4d51schedule 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
8020426740201003602580100801008010047979904923656267362673616672316691801008020024020026736661180201100991008010010000005110219112673280000801002673726737267372673726737
8020426736200003602580100801008010047979914923656267362673616672316691801008020024020026736661180201100991008010010000005110119112673280000801002673726737267372673726737
8020426736200003622580100801008010047979914923656267362673616672316691801008020024020026736661180201100991008010010000005110119112673280000801002673726737267372673726737
8020426736200003602580100801008010047979914923656267362673616672316691801008020024020026736661180201100991008010010000005110119112673280000801002673726737267372673726737
8020426736200003602580100801008010047979914923656267362673616672316691801008020024020026736661180201100991008010010000005110119112673280000801002673726737267372673726737
8020426736201003602580100801008010047979914920630267362673616672316691801008020024020026736661180201100991008010010000005110119112673280000801002673726737267372673726737
8020426736200003602580100801008010047979914923656267362673616672316691801008020024020026736661180201100991008010010000005110119112673280000801002673726737267372673726737
8020426736200003602580100801008010047979914923656267362673616672316691801008020024020026736661180201100991008010010001005110119112673280000801002673726737267372673726737
8020426736200003602580100801008010047979914923656267362673616672316691801008020024020026736661180201100991008010010001005110119112673280000801002673726737267372673726737
8020426736200003602580100801008010047979914923656267362673616672316691801008020024020026736661180201100991008010010000005110119112673280000801002673726737267372673726737

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)091e1f3f51schedule 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)9fl1d cache writeback (a8)acc2cfd5map dispatch bubble (d6)d9daddfetch restart (de)e0? int output thing (e9)eaec? int retires (ef)f5f6f7f8fd
800242672320000240362580010800108001047205900492362626706267061666531668480010800202400202670666118002110910800101000050207180024267028000000800102670726707267072670726707
800242670620000270362580010800108001047205900492362626706267061666531668480010800202400202670666118002110910800101000050204180024267028000000800102670726707267072670726707
80024267061990000362580010800108001047205900492362626706267061666531668480010800202400202670666118002110910800101000050205180073267028000000800102670726707267072670726707
80024267062000000362580010800108001047205900492362626706267061666531668480010800202400202670666118002110910800101000050204180024267028000000800102670726707267072670726707
800242670620000003625800108001080010472059004923626267062670616665141668480010800202400202670666118002110910800101000050202180024267028000000800102670726707267072670726707
80024267062000060362580010800108001047205900492362626706267061666531668480010800202400202670666118002110910800101000050204180042267028000000800102670726707267072670726707
80024267062000000362580010800108001047205900492362626706267061666531668480010800202400202670666118002110910800101000050202180042267028000000800102670726707267072670726707
80024267062000000362580010800108001047205900492362626706267061666531668480010800202400202670666118002110910800101000050204180044267028000000800102670726707267072670726707
80024267062000000362580010800108001047205900492362626706267061666531668480010800202400202670666118002110910800101000050204180024267028000000800102670726707267072670726707
80024267062000000362580010800108001047205900492362626706267061666531668480010800202400202670666118002110910800101000050204184024267028000000800102670726707267072670726707