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

CMN (uxth, 32-bit)

Test 1: uops

Code:

  cmn 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)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 int alu (97)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
100470960841000304252000200010004087707097094982135611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087707097094982135611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982135611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087707097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087707097094982135611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087707097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087707097094982135611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710

Test 2: Latency 3->1

Chain cycles: 1

Code:

  cmn w0, w1, uxth
  cset x0, cc
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03181e3f4c4d51schedule 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 cache writeback (a8)accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2020430035225006110000298932530100301002010019561981492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
2020430035225006110000298932530100301002010019561981492695530035300352736932747820100202003020030035145112020110099100201001010022013101231222995430000101003003630036300363003630036
2020430035224006110000298932530100301002010019561981492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
2020430035225006110000298932530100301002010019561981492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
2020430035225006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
2020430035225006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
2020430035224006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
2020430035225006110000298932530100301002010019561981492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
2020430035225006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
2020430035224006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)0318191e3f4c4d51schedule 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)acbranch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024300352330006110000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001000301270133112995830000100103003630036300363003630036
20024300352250006110000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
20024300352240006110000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001000001270133212995830000100103003630036300363003630036
20024300352250006110000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
20024300352250006110000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001000001270133122995830000100103003630036300363003630036
20024300352250006110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
20024300352250006110000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
20024300352250006110000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001000001270133122995830000100103003630036300363003630036
20024300352250006110000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001002001270133112995830000100103003630036300363003630036
20024300352250006110000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  cmn w0, w1, uxth
  cset x1, cc
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code, minus 1 chain cycle): 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 tlb access (a0)l1d tlb miss (a1)l1d cache writeback (a8)acc2branch cond mispred nonspec (c5)cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202043003522506110000298932530100301002010019561981492695530035300352736932747820100202003020030035145112020110099100201001010000000013101231222995430000101003003630036300363003630036
202043003522506110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000000013101231222995430000101003003630036300363003630036
202043003522506110000298932530100301002010019561981492695530035300352736932747820100202003020030035145112020110099100201001010040004013101231222995430000101003003630036300363003630036
202043003522506110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000000013101231222995430000101003003630036300363003630036
202043003522506110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000000013101231222995430000101003003630036300363003630036
202043003522506110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000000013101231222995430000101003003630036300363003630036
202043003522506110000298932530100301002010019561981492695530035300352736932747820100202003020030035145112020110099100201001010000000013101231222995430000101003003630036300363003630036
202043003522506110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000100013101231222995430000101003003630036300363003630036
202043003522506110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000060013101231222995430000101003003630036300363003630036
202043003522506110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000000013101231222995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss data (0b)18191e1f3a3f4c4d51schedule 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)ld unit uop (a6)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2002430035237000000007261000029891253001030010200101956289049269553003530035273913274982001020020300203003514511200211091020010100100000001270533112995830000100103003630036300363003630036
200243003522500000000611000029891253001030010200101956289049269553003530035273913274982001020020300203003514511200211091020010100100000001270133122995830000100103003630036300363003630036
200243003522500000000611000029891253001030010200101956289049239153003530035273913274982001020020300203003514511200211091020010100100000001270233112995830000100103003630036300363003630036
200243003522400000000611000029891253001030010200101956289049269553003530035273913274982001020020300203003514511200211091020010100100000001270133112995830000100103003630216300363003630036
200243003522500000000611000029891253001030010200101956289049269553003530035273913274982001020020300203003514511200211091020010100100000001270133112995830000100103003630036300363003630036
200243003522500000000611000029891253001030010200101956289049269553003530035273913274982001020020300203003514511200211091020010100100000001270133112995830000100103003630036300363003630036
200243003522500000000611000029891253001030010200101956289149269553003530035273913274982001020020300203003514511200211091020010100100000001270233212995830000100103003630036300363003630036
200243003522500000000611000029891253001030010200101956289049269553003530035273913274982001020020300203003514511200211091020010100100000001270133112995830000100103003630036300363003630036
200243003522500000000611000029891253001030010200101956289049269553003530035273913274982001020020300203003514511200211091020010100100000001270133112995830000100103003630036300363003630036
2002430035224000001200611000029891253001030010200101956289049269553003530035273913274982001020020300203003514511200211091020010100100000001270133112995830000100103003630036300363003630036

Test 4: throughput

Count: 8

Code:

  cmn w0, w1, uxth
  cmn w0, w1, uxth
  cmn w0, w1, uxth
  cmn w0, w1, uxth
  cmn w0, w1, uxth
  cmn w0, w1, uxth
  cmn w0, w1, uxth
  cmn w0, w1, uxth
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03l2 tlb miss instruction (0a)l2 tlb miss data (0b)1e1f3f4c4d51schedule 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)st unit uop (a7)l1d cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80204534564000000189800004874125160100160100801003440005149503305341053410432982050343360801008020016061853410781180201100991008010010000100511032422533921600001005341153411534115341153411
8020453470399013280252800004874125160100160100801003440005149503305341053410432982053343360801008041916063853410781180201100991008010010000030511032422533921600001005341153411534115341153411
8020453410400000061800494874125160100160100801003440005149503305341053410432982063343360801008020016020053410781180201100991008010010000000511022422533921600001005341153411534115341153411
8020453410400000061800004874125160100160100801003440005149503305341053410432982063343360801008020016020053410781180201100991008010010000100514722432534361600001005346253411534115346653467
80204535224000091761020800004874125160100160100801003440005198503305341053410432982063343360801008020016020053410781180201100991008010010000030511022422533921600001005341153411534115341153411
80204534104000012061800004874125160100160100801003440005149503305341053410432982063343360801008020016020053410781180201100991008010010000200511025522533921600001005341153411534115341153411
8020453410400000061800004874125160100160100801003440005149503305341053410432982063343360802708020016061453410781180201100991008010010000000511022432533921601241005341153411534115341153411
8020453410400100061800004874125160100160100801003440005149503305341053410432982060343360801008020016020053410781180201100991008010010000000511022432533921600001005341153411534115341153411
8020453410400000061800004874125160100160100801003440005149503305341053410432982063343360801008020016020053410781180201100991008010010000000511022432533921600001005341153411534115341153411
8020453410400000066800004874125160100160100801003440005149503305341053410432982060343360801008020016020053410781180201100991008010010000000511022422533921600001005341153411534115341153411

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)0309181e3f4c4d51schedule 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)9fl1d cache writeback (a8)a9acbranch mispred nonspec (cb)cfd5map dispatch bubble (d6)d9daddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80024534023990006180000479462516001016001080010343813014950300533805338043290256234335280010800201600205338078118002110910800101000005020424004453359160000105338153381533815338153381
80024533803990006180000479462516001016001080010343813014950300533805338043290256234335280010800201600205338078118002110910800101000005020424006753359160000105338153381533815338153381
80024533804000006180000479462516001016001080010343813014950300533805338043290256234335280010800201600205338078118002110910800101000005020424008753359160120105338153381534345338153381
80024533804000006180000479462516001016001080010343813014950300533805338043290256234335280010800201600205338078118002110910800101000005020424007653359160000105338153381533815338153381
80024534234000006180000479462516001016001080010343813014950300533805338043290256234335280010800201600205338078118002110910800101000005020424003453359160000105342553381533815338153381
800245338040000061800004794625160010160010800103438130149503005338053380432902562343352800108002016002053380781180021109108001010002405020424004353359160000105338153381533815338153381
80024533804000006180000479462516001016001080010343813014950300533805338043290256234335280010800201600205338078118002110910800101000005020624004453359160000105338153381533815338153381
80024533804000006180000479462516001016001080010343813014950300533805338043290270734335280010800201600205338078118002110910800101000005020724004753359160000105338153381533815338153381
80024533804000006180000479462516001016001080010343813014950300533805338043290256234335280010800201600205338078118002110910800101000005020424005353359160000105338153381533815338153381
80024533803990006180000479462516001016001080010343813014950300533805338043290270734335280010800201600205338078118002110910800101000005020424004553359160000105359353381533815338153381