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, 64-bit)

Test 1: uops

Code:

  cmn x0, 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)6d6emap 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)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
10047095061100030425200020001000408777097094982135611000100020007097811100110000073122116842000710710710710710
10047095061100030425200020001000408777097094982535611000100020007097811100110000073122116842000710710710710710
10047095061100030425200020001000408777097094982535611000100020007097811100110000073122116842000710710710710710
10047095061100030425200020001000408777097094982135611000100020007097811100110000273122116842000710710710710710
10047096061100030425200020001000408777097094982135611000100020007097811100110000073122116842000710710710710710
10047095061100030425200020001000408777097094982535611000100020007097811100110000073122116842000710710710710710
10047095061100030425200020001000408777097094982535611000100020007097811100110000073122116842000710710710710710
10047095061100030425200020001000408777097094982135611000100020007097811100110000073122116842000710710710710710
10047095061100030425200020001000408777097094982135611000100020007097811100110000073122116842000710710710710710
10047095061100030425200020001000408777097094982135611000100020007097811100110000073122116842000710710710710710

Test 2: Latency 3->1

Chain cycles: 1

Code:

  cmn x0, 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)03l2 tlb miss data (0b)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 tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2020430035225001421000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000000013101331432995430000101003003630036300363003630036
202043003522500611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000000013101431432995430000101003003630036300363003630036
2020430035225012611000029893253010030100201001958204492695530035300352736932747820100202003020030035145112020110099100201001010000003013101431452995430000101003012730036300363003630036
2020430035225001241000029893253010030100201001956198492695530035300802736972747820100202883020030127145212020110099100201001010000022098013101431442995430000101003003630036300363003630036
202043003522500611000029893253010030100201001956198492508730035300352736932747820100202003020030035145112020110099100201001010000000013101331432995430000101003003630036300363003630036
202043008022500611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000000013101331442995430000101003003630036300363003630036
2020430035225001661000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000000013101431432995430000101003003630036300363003630036
20204300352250121681000629907253010030100201001956198492700130035300352738172747820100202003020030035145112020110099100201001010042100013101431442995430000101003003630036300363003630036
2020530035225004251000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000000013101331442995430000101003003630036300363003630036
2020430035225004411000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000000013101331342995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)0309l2 tlb miss instruction (0a)l2 tlb miss data (0b)1e1f3a3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)696a6b6d6emap 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)a9acbranch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024300352250000001031000029891253001030010200101956289492695503003530035273913274982032120020300203003514511200211091020010100100000001270333222995830000100103003630082300363003630036
2002430035225000000611000029891253001030010200101957007492695503003530035273913274982001020020300203003514511200211091020010100100000001270233222995830000100103003630036300363003630036
20024300352250000004641000029891253001030010200101956289492695503003530035273913274982001020020300203003514511200211091020010100100000001270233222995830000100103003630036300363003630036
2002430035225000000611000029891253009930010200101956289492695503003530035273913274982001020020300203003514511200211091020010100100000001270233322995830000100103003630036300363003630036
2002430035225000000611000029891253001030010200101956289492695503003530035273913274982001020020300203003514511200211091020010100100000001270233222995830000100103003630036300363003630036
200243003522400027002181000029891253001030010200101956289492695503003530035273913274982001020020300203003514511200211091020010100100000001270233223002530000100103008230082300363003630036
2002430035225000000611000029891253001030010200101957017492695503003530035273913274982001020020300203003514511200211091020010100100000001270233222995830000100103003630036300363003630036
2002430035225000000611000029907253001030010200101956289492695503003530035273913274982001020020300203003514511200211091020010100100000001270233232995830000100103003630036300363003630036
20024300352250000002311000029891253001030010200101956289492695503003530035273913274982001020020300203003514511200211091020010100100000001270233322995830000100103003630036300363003630036
2002430035225001000611000029891253001030010200101956289492695503003530035273913274982001020020300203003514511200211091020010100100000001270233222995830000100103003630036300363003630036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  cmn x0, 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)0309l2 tlb miss data (0b)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)9fld unit uop (a6)l1d cache writeback (a8)accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20204300352250095361000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000013101231332995430000101003003630036300363003630036
2020430035224000611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000013101231322995430000101003003630036300363003630036
2020430035225000611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000013101231322995430000101003003630036300363003630036
202043003522400482561000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010001013101231222995430000101003003630036300363003630036
20204300352250001911000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000013101231322995430000101003003630036300363003630036
202043003522500019310000298932530100301002010019561984926955300353003527369162747820100202003020030035145112020110099100201001010000013101231322995430000101003003630036300363003630036
20204302152240002501000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010001313101231332995430000101003003630036300363003630036
20204300352250001241000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000013101231322995430000101003003630036300363003630036
20204300352240003381000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000013101231322995430000101003003630036300363003630036
202043003522500025810000298932530100301002010019561984926955300813008027432312762920273202003020030035145112020110099100201001010000013101231322995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3a3f4c4d51schedule 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)9fld unit uop (a6)l1d cache writeback (a8)a9acc2branch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024300352259012410000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100000001270133112995830000100103003630036300363003630036
2002430035225306110000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100000001270133112995830000100103003630219300363003630036
2002430035225006110024298912530010300102001019562890149269553021630035273913274982001020020300203003514511200211091020010100100000001270133112995830000100103003630036300363003630036
2002430035225006110000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100000001270133112995830000100103003630036300363003630036
2002430035225006110000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100000001270133112995830000100103003630036300363003630036
2002430035225006110000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100100001270133112995830000100103003630036300363003630036
2002430035225006110000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100000001270233212995830000100103003630126300363003630036
20024300352240094710000298912530010300102001019562890149270133003530035273913274982001020020300203003514511200211091020010100100000001270133112995830000100103008130081300363003630036
20024300352253606110000298912530010300102001019562890149269553003530035273918274982001020020300203003514511200211091020010100100020001270133212995830000100103003630036300363003630036
2002430035225006110000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100000001270133112995830000100103003630036300363003630036

Test 4: throughput

Count: 8

Code:

  cmn x0, w1, uxth
  cmn x0, w1, uxth
  cmn x0, w1, uxth
  cmn x0, w1, uxth
  cmn x0, w1, uxth
  cmn x0, w1, uxth
  cmn x0, w1, uxth
  cmn x0, 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)03mmu table walk data (08)09181e3f4c4d51schedule 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)91inst branch cond (94)inst int alu (97)9fl1d cache writeback (a8)acc2branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020453456400000061800004874125160100160100801003440005149503305341053410432982063343360801008020016020053410781180201100990100801001000000511022411533921600001005341153411534115345653411
8020453410400000061800004874125160100160100801003440005149503305341053410432982081343381801008020016020053410781180201100990100801001000000511012411533921600001005341153411534115341153411
8020453410400000061800004874125160100160100801003440005149503305341053410432982050343360801008020016020053410781180201100990100801001000000511022411533921600001005341153411534115341153411
8020453410400000061800004874125160100160100801003440005149503305341053410432982063343360801008020016020053410781180201100990100801001000000511012411533921600001005341153411534115341153411
8020453410400000061800004874125160100160100801003440005049503305341053410432982063343360801008020016020053410781180201100990100801001000000511012411533921600001005341153411534115341153411
8020453410400000061800004874125160100160100801003440005149503305341053410432982063343360801008020016020053410781180201100990100801001000000511012411533921600001005341153411534115341153411
8020453410400000061800004874125160100160100801003440005149503305341053410432982050343360801008020016020053410781180201100990100801001000000511012411533921600001005341153411534115341153411
8020453410400000061800004874125160238160100801003440005149503305341053410432982050343360801008020016020053410781180201100990100801001000000511012411533921600001005341153411534115341153411
80204534104000000124800004874125160100160100801003442704049503305341053410432982063343360801008020016020053410781180201100990100801001000000511012411533921600001005341153411534115341153411
8020453410400000061800004874125160100160100801003440005149503305341053410432982060343360801008020016020053410781180201100990100801001000000511012411533921600001005341153411534115341153411

1000 unrolls and 10 iterations

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

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)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)accfl1i cache miss demand (d3)d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800245338339906180000479462516001016001080010343813014950300053380533804329025623433528001080020160020533807811800211091080010100050200192471753359160000105338153381533815338153381
80024533804000618000047946251600101600108018234381300495030005338053380432902562343352800108002016002053380781180021109108001010005020072417753359160000105338153381533815338153381
800245338040006180000479462516001016001080010343813004950300053380533804329027073433528001080020160020533807811800211091080010100050200172417753359160000105338153381533815338153381
800245338040006180000479462516001016001080010343813004950300053380533804329027073433528001080020160020533807811800211091080010100050200172471753359160000105338153381533815338153381
8002453380399029380000479462516001016001080010343813004950300053380533804329025623433528001080020160020533807811800211091080010100050200724171753359160092105338153381533815338153381
8002453380400061800004794625160010160010800103438130049503000533805338043290249834335280010800201600205338078118002110910800101000502001724171753359160000105338153381533815338153381
80024533803997026180000479462516001016001080010343813004950300053380533804329025623433528001080020160020533807811800211091080010100050200724171753359160000105338153381533815338153381
800245338040006180000479462516001016001080010343813004950300053380533804329025623433528001080020160020533807811800211091080010100050202724121653359160000105338153381533815338153381
80024533804000618000047946251600101600108001034381301495030005338053380432902707343352800108002016002053380781180021109108001010005020072471753359160000105338153381533815338153381
8002453380400061800004794625160010160010800103438130049503000533805338043290256234335280010800201600205338078118002110910800101000502001724171753359160000105338153381533815338153381