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

Test 1: uops

Code:

  cmn x0, w1, sxth
  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)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
10047095061100030425200020001000408770709709498213561100010002000709781110011000073122116842000710710710710710
10047095061100030425200020001000408770709709498213561100010002000709781110011000073122116842000710710710710710
10047096061100030425200020001000408770709709498253561100010002000709781110011000073122116842000710710710710710
10047095061100030425200020001000408770709709498253561100010002000709781110011000073122116842000710710710710710
10047095061100030425200020001000408770709709498253561100010002000709781110011000073122116842000710710710710710
10047095061100030425200020001000408770709709498253561100010002000709781110011000073122116842000710710710710710
10047095061100030425200020001000408770709709498213561100010002000709781110011000073122116842000710710710710710
10047095061100030425200020001000408770709709498253561100010002000709781110011000073122116842000710710710710710
10047095061100030425200020001000408770709709498253561100010002000709781110011000073122116842000710710710710710
10047096061100030425200020001000408770709709498253561100010002000709781110011000073122116842000710710710710710

Test 2: Latency 3->1

Chain cycles: 1

Code:

  cmn x0, w1, sxth
  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)031e3f4c4d51schedule 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)a9acc2branch mispred nonspec (cb)cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2020430035225243611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000000013101231332995430000101003003630036300363003630036
202043003522515611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000000013101331322995430000101003003630036300363003630036
202043003522521611000029893253010030100201001956198492700230035300352736932747820100202003020030035145112020110099100201001010000000013101231232995430000101003003630036300363003630036
202043003522527611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000000013101231222995430000101003003630036300363003630036
202043003522512611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000000013101331222995430000101003003630036300363003630036
202043003522524611000029893253011730100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000000013101331332995430000101003003630036300363003630036
202043003522515611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000000013101331322995430000101003003630036300363003630036
202043003522515611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000000013101331332995430000101003003630036300363003630036
202043003522518611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000000013101331332995430000101003003630036300363003630036
2020430035225294611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000000013101331332995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)091e3f4c4d51schedule 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)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2002430035225000611000029891253001030010200101956289149269553003530035273910327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
20024300352250002321000029891253001030010200101956289049269553003530035273910327498200102002030020300351451120021109102001010010000001270233112995830000100103003630036300363003630036
2002430035225000611000029891253001030010200101956289049269553003530035273910327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
2002430035225000611000029891253001030010200101956289049269553003530035273910327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
20024300352250001261000029891253001030010200101956289049269553003530035273910627521200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
2002430035225000611000029891253001030010200101956289049269553003530035273910327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
2002430035225000611000029891253001030010200101956289049269553003530035273910327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
2002430035225000611000029891253001030010200101956289049269553003530035273910327498200102002030020300351451120021109102001010010000001270133112995830000100103003630036300363003630036
2002430035225000611000029891253001030010200101956289049269553003530035273910327498200102002030020300351451120021109102001010010000001270133112997830000100103003630036300363003630036
200243003522500012410000298912530010300102001019562890492695530035300352739101527498200102002030020300351451120021109102001010010000001270133122995830000100103003630036300363003630036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  cmn x0, w1, sxth
  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)03mmu table walk data (08)18191e3f4c4d51schedule 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)accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2020430035225000156110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
202043003522500006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
202043003522500006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
202043003522500006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
202043003522500006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010001613101231222995430000101003003630036300363003630036
202043003522500006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
202043003522500006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
202043003522500006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
202043003522500006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
202043003522500006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036

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 instruction (0a)l2 tlb miss data (0b)1e3a3f4c4d51schedule 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
200243003522510100268100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010001274173314142995830000100103003630036300363003630036
200243003522510100268100002989125300103001020010195628904926955300803003527403327498200102002030020300351451120021109102001010010001274153313152995830000100103003630036300363003630036
20024300352241010026810000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001002131274143310152995830000100103003630036300363003630036
200243003522510100268100002989125300103001020010195628904926955300663003527391327498200102002030020300351451120021109102001010010001274163313152995830000100103003630036300363003630036
20024300352251010026810000298912530010300102001019562890492695530035300352739132752720010200203002030035145112002110910200101001001351274143312132995830000100103003630036300363003630036
200243003522510100268100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010001274143313142995830000100103003630036300363003630036
20024300352251110026810000298912530010300102001019562890492695530035300352739132749820010200203002030035145212002110910200101001009127411331272995830000100103003630036300363003630036
200243003522510100268100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010001274113311132995830000100103003630036300363003630036
20024300352251010026810000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000127414331272995830000100103003630036300363003630036
20024300352251010026810000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001001591274153315152995830000100103003630036300363003630036

Test 4: throughput

Count: 8

Code:

  cmn x0, w1, sxth
  cmn x0, w1, sxth
  cmn x0, w1, sxth
  cmn x0, w1, sxth
  cmn x0, w1, sxth
  cmn x0, w1, sxth
  cmn x0, w1, sxth
  cmn x0, w1, sxth
  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)l2 tlb miss data (0b)0e18191e1f3a3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)696a6d6emap 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 tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80204534564000000000061800004874125160100160100801003440005495033053410534104329820603433608010080200160200534107811802011009910080100100020600511022422533921600001005341153411534115341153411
80204534104000000000061800004874125160100160100801003440005495033053410534104329820603433608010080200160200534107811802011009910080100100000000511012411533921600001005341153411534115341153411
80204534104000000000061800004874125160100160100801003440005495033053410534104329820633433608010080200160200534107811802011009910080100100000000511012411533921600001005341153411534115341153411
80204534104000000000061800004874125160100160100801003440005495033053410534104329820603433608010080200160200534537811802011009910080100100000000511012411533921600001005341153411534115341153411
80204534104000000000061800004874125160100160100801003440005495033053410534104329820633433608010080200160200534107811802011009910080100100000000511012411533921600001005341153411534115341153411
802045341040000000000631800004874125160100160100801003440005495033053410534104329820633433608010080200160200534107811802011009910080100100400000511012411533921600001005341153411534115341153411
80204534103990000000061800004874125160100160100801003440005495033053410534104329820633433608010080200160200534107811802011009910080100100000000511012411533921600001005341153411534115341153411
80204534104000000000061800004874125160100160100801003440005495033053410534104329820633433608010080200160200534107811802011009910080100100000000511012411533921600001005341153411534115341153411
80204534104000000000061800004874125160100160100801003440005495033053410534104329820603433608010080200160200534107811802011009910080100100000000511012411533921600001005341153411534115341153411
80204534104000000000061800004874125160100160100801003440005495033053410534104329820503433608010080200160200534107811802011009910080100100000000511012411533921600001005341153411534115341153411

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)6061696a6d6emap 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)accfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80024534024000678000047946251600101600108001034381300049503005338053380432902707343352800108002016002053380781180021109108001010005020514244453359160000105338153381533815338153381
80024533804000618000047946251600101600108001034381300049503005338053380432902707343352800108002016002053380781180021109108001010005020004244453359160000105338153381533815338153381
80024533804000618000047946251600101600108001034381300049503005338053380432902707343352800108002016002053380781180021109108001010005020504244453359160000105338153381533815338153381
80024533804000618000047946251600101600108001034381300049503005338053380432902562343352800108002016002053380781180021109108001010005020004243453359160000105338153381533815338153381
80024533804000618000047946251600101600108001034381300049503005338053380432902707343352800108002016002053380781180021109108001010005020005245553359160000105338153381533815338153381
80024533803990618000047946251600101600108001034381300049503005338053380432902707343352800108002016002053380781180021109108001010005020005245553359160000105338153381533815338153381
80024533803990618000047946251600101600108001034381300049503005338053380432902562343352800108002016002053380781180021109108001010005020004244453359160000105338153381533815338153381
80024533804000618000047946251600101600108001034381300049503005338053380432902707343352800108002016002053380781180021109108001010005020004244453359160000105338153381533815338153381
80024533803990618000047946251600101600108001034381301049503005338053380432902707343352800108002016002053380781180021109108001010005020003243253359160000105338153381533815338153381
80024533803990618000047946251600101600108001034381300049503005338053380432902562343352800108002016002053380781180021109108001010005020004245453359160000105338153381533815338153381