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

ADDS (uxtw, 32-bit)

Test 1: uops

Code:

  adds w0, w0, w1, uxtw
  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)ld unit uop (a6)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1004103570619172510001000100062250103510358053882100010002000103540111001100000073227119931000100010361036103610361036
10041035801179172510001000100062250103510358053882100010002000103540111001100011073127119931000100010361036103610361036
1004103580619172510001000100062250103510358053882100010002000103540111001100000073127119931000100010361036103610361036
1004103570619172510001000100062250103510358053882100010002000103540111001100000073127119931000100010361036103610361036
1004103570619172510001000100062250103510358053882100010002000103540111001100000073127119931000100010361036103610361036
1004103580619172510001000100062250103510358053882100010002000103540111001100002073127119931000100010361036103610361036
1004103570619172510001000100062250103510358053882100010002000103540111001100000073127119931000100010361036103610361036
1004103580619172510001000100062250103510358053882100010002000103540111001100000073127119931000100010361036103610361036
10041035806191725100010001000622501035103580538821000100020001035401110011000021073127119931000100010361036103610361036
1004103570619172510001000100062250103510358053882100010002000103540111001100000073127119931000100010361036103610361036

Test 2: Latency 1->2

Code:

  adds w0, w0, w1, uxtw
  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)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 miss (a1)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020410035759829920251010010100101006471521496955100351003586563873210100102002020010035401110201100991001010010000071012711999510000101001003610036100361003610036
10204100357521619920251010010100101006471521496955100351003586563873210100102002020010035401110201100991001010010000071012711999510000101001003610036100361003610036
10204100357515619920251010010100101006471521496955100351003586563873210100102002020010035401110201100991001010010000071012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102002020010035401110201100991001010010000071012711999510000101001003610036100361003610036
1020410035760619920251010010100101006471521496955100351003586563873210100102002020010035401110201100991001010010040971012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102002020010035401110201100991001010010000071012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102002020010035401110201100991001010010000071012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102002020010035401110201100991001010010000071012711999510000101001003610036100361003610036
1020410035753846199202510100101001010064715214969551003510035865638732101001020020200100354011102011009910010100100001271012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102002020010035401110201100991001010010000071012711999510000101001003610036100361003610036

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 cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100241003575061991825100101001010010647246149695510035100358678387541001010020200201003540111002110910100101005764032733999710000100101003610036100361003610036
10024100357536199182510010100101001064724614969551003510035867838780100101002020020100354011100211091010010100064032733999710000100101003610036100361003610036
10024100357506199182510010100101001064724614969551003510035867838754100101002020020100354011100211091010010100364032733999710000100101003610036100361003610036
100241003575061991825100101001010010647246149695510035100358678387541001010020200201003540111002110910100101002764032733999710000100101003610036100361003610036
100241003575061991825100101001010010647246149695510035100358678387541001010020200201003540111002110910100101003064032733999710000100101003610036100361003610036
100241003576061991825100101001010010647246149695510035100358678387541001010020200201003540111002110910100101003664032733999710000100101003610036100361003610036
1002410035750619918251001010010100106472460496955100351003586783875410010100202002010035401110021109101001010010264032733999710000100101003610036100831003610036
10024100357566199182510010100101001064724614969551003510035867838754100101002020020100354011100211091010010100364043633999710000100101003610036100361003610036
1002410035750619918251001010010100106472461496955100351003586783875410010100202002010035401110021109101001010011164032733999710000100101003610036100361003610036
100241003576061991825100101001010010647246149695510035100358678387541001010020200201003540111002110910100101019664032733999710000100101003610036100361003610036

Test 3: Latency 1->3

Code:

  adds w0, w1, w0, uxtw
  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)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)9fld unit uop (a6)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020410035750619920251010010100101006471521496955100351003586563873210100102002020010035401110201100991001010010000371012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471520496955100351003586563873210100102002020010035402110201100991001010010000071012711999510000101001003610036100361003610036
1020410035750619920251010010136101006471521496955100351003586563873210100102002020010035401110201100991001010010000371012711999510000101001003610036100361003610036
10204100357501899920251010010100101006471520496955100351003586563873210100102002020010035401110201100991001010010001071012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102002020010035401110201100991001010010000071012711999510000101001003610036100361003610036
10204100357505369920251010010100101006471520496955100351003586563873210100102002020010035401110201100991001010010000071012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471520496955100351003586563873210100102002020010035401110201100991001010010000071012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471520496955100351003586563873210100102002020010035401110201100991001010010000071012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471520496955100351003586563873210100102002020010035401110201100991001010010005071012711999510000101001003610036100361003610036
1020410035750619920251010010100101006471520496955100351003586563873210100102002020010035401110201100991001010010000071012711999510000101001003610036100361003610036

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)flags prf full (73)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)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10024100357506199182510010100101001064724614969551003510035867803875410010100202002010035401110022109101001010010364022722999710000100101003610036100361003610036
10024100357506199182510010100101001064724614969551003510035867803875410010100202002010035401110021109101001010000064022722999710000100101003610036100361003610036
10024100357506199182510010100101001064724614969551003510035867803875410010100202002010035401110021109101001010080364022722999710000100101003610036100361003610036
10024100357506199182510010100101001064724614969551003510035867803875410010100202002010035401110021109101001010000364022722999710000100101003610036100361003610036
100241003575126199182510010100101001064724614969551003510035867803875410010100202002010035401110021109101001010000064022722999710000100101003610036100361003610036
100241003575061991825100101001010010647246149695510035100358678038754100101002020020100354011100211091010010100502164022722999710000100101003610036100361003610036
100241003575061991825100101001010010647246149695510035100358678038754100101002020020100354011100211091010010100103064022722999710000100101003610036100361003610036
10024100357506199182510010100101001064724614969551003510035867803875410010100202002010035401110021109101001010050364022722999710000100101003610036100361003610036
10024100357506199182510010100101001064724614969551003510035867803875410010100202002010035401110021109101001010000064022722999710000100101003610036100361003610036
10024100357506199182510010100101001064724614969551003510035867803875410010100202002010035401110021109101001010000064022722999710000100101003610036100361003610036

Test 4: Latency 4->2

Chain cycles: 1

Code:

  adds w0, w1, w2, uxtw
  cset x1, cc
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4
  mov x4, 5

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)031e3f4d51schedule 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 cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20204200351500611993025201002010020112129723304916955020035200351742581748520112202243023620035641120201100991002010010100001111319162001220000201002003620036200362003620036
20204200351500611993025201002010020112129723314916955020035200351742571748620112202243023620035641120201100991002010010100001111320162001220000201002003620036200362003620036
20204200351500611993025201002010020112129723314916955020035200351742581748520112202243023620035641120201100991002010010100001111320162001220000201002003620036200362003620036
20204200351500611993025201002010020112129723314916955020035200351742571748620112202243023620035641120201100991002010010100001111319162001220000201002003620036200362003620036
20204200351500611993025201002010020112129723314916955020035200351742581748520112202243023620035641120201100991002010010100001111320162001220000201002003620036200362003620036
20204200351500611993025201002010020112129723304916955020035200351742571748620112202243023620035641120201100991002010010100001111320162001220000201002003620036200362003620036
202042003515005361993025201002010020112129723314916955020035200351742571748520112202243023620035641120201100991002010010100001111320162001220000201002003620036200362003620036
20204200351500611993025201002010020112129723314916955020035200351742581748520112202243023620035641120201100991002010010100001111319162001220000201002003620036200362003620036
202042003514901051993025201002010020112129723304916955020035200351742581748620112202243023620035641120201100991002010010100001111319162001220000201002003620036200362003620036
20204200351500611993025201002010020112129723304916955020035200351742571748620112202243023620035641120201100991002010010100001111320162001220000201002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03181e1f3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)5f696a6b6d6emap 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 mispred nonspec (cb)cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0? int output thing (e9)eb? int retires (ef)f5f6f7f8fd
20024200351500006119918252001020010200101297247049169550200352003517428317504200102002030020200356411200211091020010100100057012700001270001119995200000200102003620036200362003620036
2002420035150000661991825200102001020010129724704916955020035200351742831750420010200203002020035641120021109102001010010000012700001270001119995200000200102003620036200362003620036
2002420035149000821991825200102001020010129724704916955020035200351742831750420010200203002020035641120021109102001010010000012700001270001119995200000200102003620036200362003620036
2002420035150000611991825200102001020010129724704916955020035200351742831750420010200203002020035641120021109102001010010000012700001270001219995200000200102003620036200362003620036
2002420035150000611991825200102001020010129724704916955020035200351742831750420010200203002020035641120021109102001010010013012700002270001119995200000200102003620036200362003620036
2002420035150000611991825200102001020010129724704916955020035200351742831750420010200203002020035641120021109102001010010000012700001270001119995200000200102003620036200362003620036
20024200351500006119918252001020010200101297247049169550200352003517428317504200102002030020200356411200211091020010100100057012700001270001119995200000200102003620036200362003620036
2002420035150000611991825200102001020010129724704916955020035200351742831750420010200203002020035641120021109102001010010000012700001270001119995200000200102003620036200362003620036
2002420035150000611991825200102001020010129724704916955020035200351742831750420010200203002020035641120021109102001010010000012700002270001119995200000200102003620036200362003620036
2002420035150000611991825200102001020010129724704916955020035200351742831750420010200203002020035641120021109102001010010000012700001270001119995200000200102003620036200362003620036

Test 5: Latency 4->3

Chain cycles: 1

Code:

  adds w0, w1, w2, uxtw
  cset x2, cc
  mov x0, 1
  mov x1, 2
  mov x2, 3
  mov x3, 4
  mov x4, 5

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code, minus 1 chain cycle): 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 cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)e0? int output thing (e9)eb? int retires (ef)f5f6f7f8fd
20204200351500611993025201002010020112129723304916955200352003517425717485201122022430236200356411202011009910020100101000011113201620012200000201002003620036200362003620036
20204200351500611993025201002010020112129723304916955200352003517425717486201122022430236200356411202011009910020100101000011113191620012200000201002003620036200362003620036
202042003515002511993025201002010020112129723304916955200352003517425817485201122022430236200356411202011009910020100101000311113191620012200000201002003620036200362008120036
20204200351500611993025201002010020112129723314916955200352003517425717486201122022430236200356411202011009910020100101000011113201620012200000201002003620036200362003620036
20204200351500611993025201002010020112129723314916955200352003517425817485201122022430236200356411202011009910020100101001011113201620012200000201002003620036200362003620036
20204200351500611993025201002010020112129723314916955200352003517425817485201122022430236200356411202011009910020100101000911113191620012200000201002003620036200362003620036
20204200351500611993025201002010020112129723314916955200352003517425717486201122022430236200356411202011009910020100101000011113191620012200000201002003620036200362003620036
20204200351500611993025201002010020112129723314916955200352003517425717486201122022430236200356411202011009910020100101000011113191620012200000201002003620036200362003620036
20204200351500611993025201002010020112129723314916955200352003517425817485201122022430236200356411202011009910020100101000011113191620012200000201002003620036200362003620036
202042003515007111993025201002010020112129723314916955200352003517425817485201122022430236200356411202011009910020100101000011113191620012200000201002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03181e1f3f4d51schedule 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 cache writeback (a8)accdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200242003515000072199182520010200102001012972470049169552003520035174283175042001020020300202003564112002110910200101001000112700227111999520000200102003620036200362003620036
200242003515000061199182520010200102001012972470049169552003520035174283175042001020020300202003564112002110910200101001002198012703127441999520000200102003620036200362003620036
2002420035150000193199182520010200102001012972470049169552003520035174283175042001020020300202003564112002110910200101001000012700127111999520000200102003620036200362003620036
200242003515000061199182520010200102001012972470049169552003520035174283175042001020020300202003564112002110910200101001000012700127111999520000200102003620036200362003620036
200242003515000061199182520010200102001012972470049169552003520035174283175042001020020300202003564112002110910200101001000012700127111999520000200102003620036200362003620036
200242003515000061199182520010200102001012972470049169552003520035174283175042001020020300202003564112002110910200101001000012700127111999520000200102003620036200362003620036
200242003515000061199182520010200102001012972470049169552003520035174283175042001020020300202003564112002110910200101001003012700127111999520000200102003620036200362003620036
200242003515000061199182520010200102001012972471149169552003520035174283175042001020020300202003564112002110910200101001000012700127121999520000200102003620036200362003620036
200242003515000061199182520010200102001012972470049169552003520035174283175042001020020300202003564112002110910200101001000012700127111999520000200102003620036200362003620036
200242003515000061199182520010200102001012972470049169552003520035174283175042001020020300202003564112002110910200101001000012700127111999520000200102003620036200362003620036

Test 6: throughput

Count: 8

Code:

  adds w0, w8, w9, uxtw
  adds w1, w8, w9, uxtw
  adds w2, w8, w9, uxtw
  adds w3, w8, w9, uxtw
  adds w4, w8, w9, uxtw
  adds w5, w8, w9, uxtw
  adds w6, w8, w9, uxtw
  adds w7, w8, w9, uxtw
  mov x8, 9
  mov x9, 10
  mov x10, 11

(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)03181e1f3f51schedule 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
80204267622000005625801008010080100400500492365526735267351667231669080100802001602002673539118020110099100801001000005110219222673180000801002673626736267362673626736
80204267352000005825801008010080100400500492365526735267351667231669080100802001602002673539118020110099100801001000005110219222673180000801002673626736267362673626736
802042673520000010425801008010080100400500492365526735267351667231669080100802001602002673539118020110099100801001000005110219222673180000801002673626736267362673626736
80204267352000005625801008010080100400500492365526735267351667231669080100802001602002673539118020110099100801001000005110219222673180000801002673626736267362673626736
80204267352010007925801008010080100400500492365526735267351667231669080100802001602002673539118020110099100801001000005110219222673180000801002673626736267362673626736
802042673520000016725801008010080100400500492365526735267351667231669080100802001602002673539118020110099100801001000005110219222673180000801002673626736267362673626736
80204267352010005625801008010080100400500492365526735267351667231669080100802001602002673539118020110099100801001000005110219222673180000801002673626736267362673626736
8020426735200000148025801008010080100400500492365526735267351667231669080100802001602002673539118020110099100801001000005110219222673180000801002673626736267362673626736
80204267352000003525801008010080100400500492365526735267351667231669080100802001602002673539118020110099100801001000405110219222673180000801002673626736267362673626736
80204267352000005825801008010080100400500492365526735267351667231669080100802001602002673539118020110099100801001000005110219222673180000801002673626736267362673626736

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)09l2 tlb miss data (0b)191e3f51schedule 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
8002426720200000002712580010800108001040005014923625267052670516665316683800108002016002026705391180021109108001010005020171816162670280000800102670626706267062670626706
8002426705200000003525800108001080010400050149236252670526705166653166838001080020160020267053911800211091080010100050206186162670280000800102670626706267062670626706
8002426705200000003525800108001080010400050149236252670526705166653166838001080020160020267053911800211091080010100050206181772670280000800102670626706267062670626706
8002426705200000003525800108001080010400050149236252670526705166653166838001080020160020267053911800211091080010100050206181662670280064800102670626706267062670626706
8002426705200000003525800108001080010400050149236252670526705166653166838001080020160020267053911800211091080010100050206187162670280000800102670626706267062670626706
8002426705200000003525800108001080010400050149236252670526705166653166838001080020160020267053911800211091080010100050206181662670280000800102670626706267062670626706
80024267052000000058258001080010800104000501492362526705267051666531668380010800201600202670539118002110910800101000502061816182670280000800102670626706267062670626706
800242670520001000320258001080010800104000501492362526705267051666531668380010800201600202670539218002110910800101000502016181662670280000800102670626706267062670626706
80024267052000000035258001080010800104000501492362526705267511666531668380010800201600202670539218002110910800101000502016181662670280000800102670626706267062670626706
8002426705200010003525800108001080010400050149236252670526705166653166838001080020160020267053911800211091080010100050207187182670280000800102670626706267062670626706