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

Test 1: uops

Code:

  cmn x0, w1, sxtb
  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
100470960611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982135611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470953611000304252000200010004087717097094982135611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110001073122116842000710710710710710
100470960611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982135611000100020007097811100110000073122116842000710710710710710
100470960611000304252000200010004087717097094982135611000100020007097811100110000073122116842000710710710710710

Test 2: Latency 3->1

Chain cycles: 1

Code:

  cmn x0, w1, sxtb
  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)18191e1f3a3f4c4d51schedule 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)acc2branch mispred nonspec (cb)cdcfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2020430035225000150061100002989325301003010020100195619800492695530035300352736932747820100202003020030035145112020110099100201001010000000131010331222995430000101003003630036300363003630036
202043003522500000261100002989325301003010020100195619800492695530035300352736932747820100202003020030035145112020110099100201001010000000131010231222995430000101003003630036300363003630036
202043003522500000061100002989325301003010020100195619800492695530035300352736932747820100202003020030035145112020110099100201001010000000131010331222995430000101003003630036300363003630036
202043003522500000061100002989325301003010020100195619800492695530035300352736932747820100202003020030035145112020110099100201001010000000131010331222995430000101003003630036300363003630036
202043003522500000061100002989325301003010020100195619800492695530035300352736932747820100202003020030035145112020110099100201001010000000131010231232995430000101003003630036300363003630172
2020430216227063924616061100002989325301003010020100195619800492695530035300352736932747820100202003020030035145112020110099100201001010000000131010231222995430000101003003630036300363003630036
202043003522500000061100002989325301003010020100195619800492695530035300352736932747820100202003020030035145112020110099100201001010000000131010231222995430000101003003630036300363003630036
202043003522500000061100002989325301003010020100195619800492695530035300352736932747820100202003020030035145112020110099100201001010000000131010231222995430000101003003630036300363003630036
202043003522500000061100002989325301003010020100195619800492695530035300352736932747820100202003020030035145112020110099100201001010000000131010231222995430000101003003630036300363003630036
202043003522500000061100002989325301003010020100195619800492695530035300352736932747820100202003020030035145112020110099100201001010000010131010331232995430000101003003630036300363003630036

1000 unrolls and 10 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)9fld unit uop (a6)l1d cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200243003522506110000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001000001270233112995830000100103003630036300363003630036
2002430035225044110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000021270133212995830000100103003630036300363003630036
20024300352250251100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010009001270133112995830000100103003630036300363003630036
20024300352250726100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010006901270133112995830000100103003630036300363003630036
20024300352250726100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010009001270133112995830000100103003630036300363003630036
20024300352250726100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010008401270133112995830000100103003630036300363003630036
2002430035224072610000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000001270233112995830000100103003630036300363003630036
2002430035225061100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010008401270133112995830000100103003630036300363003630036
2002430035224061100002989125300103002520010195628904926955300353003527391327498200102013630020300351452120021109102001010010007501270133112995830000100103003630036300363003630036
20024300352250251100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010007801270133112995830000100103003630036300363003630036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  cmn x0, w1, sxtb
  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 instruction (07)mmu table walk data (08)1e1f3f4c4d51schedule 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)9facc2cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20204300352250024061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
2020430035225000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
20204300352250000441100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231322995430000101003003630036300363003630036
2020430035225000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
20204300352250000536100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
2020430035225000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231322995430000101003003630036300363003630036
2020430035225000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
2020430035224000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
2020430035224000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101003013101231222995430000101003003630036300363003630036
2020430035225000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036

1000 unrolls and 10 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)9fld unit uop (a6)l1d cache writeback (a8)a9accfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0? int output thing (e9)eaeb? int retires (ef)f5f6f7f8fd
20024300352250516100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010000012700001333000126299583000000100103003630036300363003630036
20024300352250252100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010000012700005330001113299583000000100103003630036300363003630036
20024300352250102110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001021201270000133300013529958300001614100103003630036300363003630036
20024300352250611000029891253001030010200101956289149269553003530035273913274982001020020300203003514511200211091020010100100003127000013330001113299583000000100103003630036300363003630036
200243003522509801000029891253001030010200101956289149269553003530035273913274982001020020300203003514511200211091020010100100000127100013330001113299583000000100103003630036300363003630036
2002430035225010321000029891253001030010200101956289149269553003530035273913274982001020020300203003514511200211091020010100100000127000013330001214299583000000100103003630036300363003630036
2002430035225015261000029891253001030010200101956289149269553003530035273913274982001020020300203003514511200211091020010100100100127000013330001213299583000000100103003630036300363003630036
200243003522505571000029891253001030010200101956289149269553003530035273913274982001020020300203003514511200211091020010100102000127000012330001211299583000000100103003630036300363003630036
2002430035225010041000029891253001030010200101956289149269553003530035273913274982001020020300203003514511200211091020010100100000127000013330001313299583000000100103003630036300363003630036
200243003522509711000029891253001030010200101956289149269553003530035273913274982001020020300203003514511200211091020010100100000127000014330001313299583000000100103003630036300363003630036

Test 4: throughput

Count: 8

Code:

  cmn x0, w1, sxtb
  cmn x0, w1, sxtb
  cmn x0, w1, sxtb
  cmn x0, w1, sxtb
  cmn x0, w1, sxtb
  cmn x0, w1, sxtb
  cmn x0, w1, sxtb
  cmn x0, w1, sxtb
  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)03l1i tlb fill (04)mmu 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)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)ld unit uop (a6)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80204534564000000000026280000487412516010016010080100344000514950330534105341043298205034336080100802001602005341078118020110099100801001000000005114122499533921600001005341153411534115341153411
8020453410400000000002628000048741251601001601008010034400051495033053410534104329820503433608010080200160200534107811802011009910080100100000000511492474533921600001005341153411534115341153411
802045341040000000000283800004874125160100160100801003440005149503305341053410432982050343360801008020016020053410781180201100991008010010000000051149241010533921600001005341153411534115341153411
8020453410400000000002628000048741251601001601008010034400051495033053410534104329820503433608010080200160200534107811802011009910080100100000000511491799533921600001005341153411534115341153411
80204534104000000000028380000487412516010016010080100344000514950330534105341043298205034336080100802001602005341078118020110099100801001000000005114102499533921600001005341153411534115341153411
802045341040000000000262800454874125160100160100801003440005149503305341053410432982060343360801008020016020053410781180201100991008010010000000051141024910533921600001005341153411534115341153411
8020453410399000000002628000048741251601001601008010034400051495033053410534104329820503433608010080200160200534107811802011009910080100100001000511492499533921600001005341153411534115341153411
8020453410400000000002628000048741251601001601008010034400051495033053410534104329820633433608010080200160200534107811802011009910080100100000000511492494533921600001005341153411534115341153411
8020453410400000000002628000048741251601001601008010034400051495033053410534104329820633433608010080200160200534107811802011009910080100100000000511492499533921600001005341153411534115341153411
8020453410400000000002628000048741251601001601008010034400051495033053410534104329820503433608010080200160200534107811802011009910080100100000000511472499533921600001005341153411534115341153411

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)5f60696a6d6emap 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)a9acc2branch cond mispred nonspec (c5)cfd0l1i cache miss demand (d3)d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8002453402400020008000047946251600101600108001034381301049503005338053380432902562343352800108002016002053380781180021109108001010000000502000192412853359160000105338153381533815338153381
80024533804000248080000479462516001016001080010343813000495030053380533804329025623433528001080020160020533807811800211091080010100000005020001224111253359160000105338153381533815338153381
80024533804000189080000479462516001016001080010343813000495030053380533804329025623433718001080020160020533807811800211091080010100000005020001324151353359160000105339953381533815338153381
80024533804000191880000479462516001016001080010343813000495030053380533804329025623433528001080020160020533807811800211091080010100000005020001224121253359160000105338153381533815338153381
80024533804000182580000479462516001016001080010343813000495030053380533804329027073433528001080020160020533807811800211091080010100000005020001324151353359160000105338153381533815338153381
80024533804000183080000479462516001016001080010343813000495030053380533804329027073433528001080020160020533807811800211091080010100000005020001324101453418160000105338153381533815338153381
800245338040018618000047946251600101600108001034381300049503005338053380432902707343352800108002016002053380781180021109108001010000000502000724131353359160000105338153381533815338153381
8002453380399010338000047946251600101600108001034381300049503005338053380432902562343352800108002016002053380781180021109108001010000000502000724131353359160106105338153381533815338153381
8002453380399019508000047946251600101600108001034381300049503005338053380432902707343352800108013416002053380781180021109108001010000000502000132491453359160000105338153381533815338153381
8002453380399018368000047946251600101600108001034381300049503005338053380432902562343352800108002016002053380781180021109108001010000000502000122481253359160000105338153381533815338153381