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

Test 1: uops

Code:

  cmn w0, 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)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)l1d cache writeback (a8)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
1004709506110003042520002000100040877709709498253561100010002000709781110011000073122116842000710710710710710
1004709506110003042520002000100040877709709498213561100010002000709781110011000073122116842000710710710710710
1004709596110003042520002000100040877709709498213561100010002000709781110011000073122116842000710710710710710
1004709506110003042520002000100040877709709498253561100010002000709781110011000073122116842000710710710710710
1004709506110003042520002000100040877709709498213561100010002000709781110011000073122116842000710710710710710
1004709506110003042520002000100040877709709498253561100010002000709781110011000073122116842000710710710710710
1004709606110003042520002000100040877709709498213561100010002000709781110011000073122116842000710710710710710
1004709506110003042520002000100040877709709498213561100010002000709781110011000073122117062000710710710710710
1004709506110003042520002000100040877709709498213561100010002000709781110011000073122116842000710710710710710
1004709506110003042520002000100040877709709498213561100010002000709781110011000073122116842000710710710710710

Test 2: Latency 3->1

Chain cycles: 1

Code:

  cmn w0, 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)03mmu 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)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)accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202043003522500000006110000298932530100301002010019561981492695503003530035273693274782010020200302003003514511202011009910020100101000013101331222995430000101003003630036300363003630036
2020430035225000000072610000298932530100301252012519561981492695503003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
2020430035225000000025110000298932530100301002010019561981492695503003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
202043003522500000006110000298932530100301002010019561981492695503003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
2020430035225000000010310000298932530100301002010019561981492695503003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
202043003522500000006110000298932530100301002010019561981492695503003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
202043003522500000006110000298933230100301002010019561981492695503003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363021730036
202043003522500000006110000298932530100301002010019561981492695503003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
202043003522500000006110000298932530100301002010019561981492695503003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
202043003522500000006110000298932530100301002010019561981492695503003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036

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)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 tlb access (a0)ld unit uop (a6)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024300352240611000029891253001030010200101956289049269550300353003527391032749820010200203002030035145112002110910200101001000001270533212995830000100103003630036300363003630036
20024300352250611000029891253001030010200101956289049269550300353003527391032749820010200203002030035145112002110910200101001000001270233212995830000100103003630036300363003630036
20024300352250611000029891253001030010200101956289049269550300353003527391032749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
20024300352250611000029891253001030010200101956289149269550300353003527391032749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
20024300352250611000029891253001030010200101956289049269550300353003527391032749820010200203002030035145112002110910200101001000101270133122995830000100103003630036300363003630036
20024300352250611000029891253001030010200101956289049269550300353003527391732749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
20024300352240611000029891253001030010200101956289149269550300353003527391032749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
20024300352250611000029891253001030010200101956289049269550300353003527391032749820010200203002030035145212002110910200101001000001270133112995830000100103003630036300673003630036
20024300352240611000029891253001030010200101956289049269550300353003527391032749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
20024300352250611000029891253001030010200101956289049269550300353003527391032749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  cmn w0, 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 data (08)l2 tlb miss data (0b)18191e1f3f4c4d51schedule 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)acbranch cond mispred nonspec (c5)cdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20204300352250000001871000029893253010030100201001956198049269553003530035273693274782010020200302003003514521202011009910020100101002000013101331332995430000101003003630036300363003630036
20204300352250000004221000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000000013101331432995430000101003003630036300363003630036
202043003522500000038210000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010001400013101331332995430000101003003630082300363003630036
20204300352250000004431000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000000013101331432995430000101003003630036300363003630036
2020430035224000001324221000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000000013101331332995430000101003003630036300363003630036
20204300352240000003571000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000000013101331332995430000101003003630036300363003630036
20204300352250000004001000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000000013101431332995430000101003003630036300363003630036
20204300352250000008941000029893253010030100201001956198149269553003530035273693274782010020200302003003514511202011009910020100101000000013101331332995430000101003003630036300363003630036
202043003522500000013011000029893253010030100201001956198049269553003530035274003274782010020200302003003514511202011009910020100101000100013101331332995430000101003003630036300363003630036
20204300352250000902621000529893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000000013101331332995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03090f1e1f3f4c4d51schedule 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)acc2cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024300352250000611000029891253001030010200101956289004926955300353003527391327498200102002030020300351451120021109102001010010081001270133313132995830000100103003630036300363003630036
20024300352250000611000029891253001030010200101956289004926955300353003527391327498200102002030020300351451120021109102001010010081001270133313112995830000100103003630036300363003630036
2002430035225000061100002989125300103001020010195628901492695530035300352739132749820010200203002030035145112002110910200101001008400127011331262995830000100103003630036300363003630036
2002430035225000061100002989125300103001020010195628900492695530035300352739132749820010200203002030035145112002110910200101001007200127013335132995830000100103003630036300363003630036
200243003522500006110000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100000127053311132995830000100103003630036300363003630036
2002430035224100061100002989125300103001020010195628900492695530035300352739132749820010200203002030035145112002110910200101001009000127011336132995830000100103007030036300363003630036
200243003522501034461100002989125300103001020010195628900492695530035300352739132749820010200203002030035145112002110910200101001008700127013331352995830000100103003630036300363003630036
20024300352250000611000029891253001030010200101956289004926955300353003527391327498200102002030020300352911120021109102001010010081001270133311132995830000100103003630036300363003630036
20024300352240000611000029891253001030010200101956289004926955300353003527391327498200102002030020300351451120021109102001010010000012705335132995830000100103003630036300363003630036
2002430035225000061100002989125300103001020010195628910492695530035300352739132749820010200203002030035145112002110910200101001000001270133313112995830000100103003630036300363003630036

Test 4: throughput

Count: 8

Code:

  cmn w0, w1, sxtb
  cmn w0, w1, sxtb
  cmn w0, w1, sxtb
  cmn w0, w1, sxtb
  cmn w0, w1, sxtb
  cmn w0, w1, sxtb
  cmn w0, w1, sxtb
  cmn w0, 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)03mmu table walk data (08)181e3f4c4d51schedule 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 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
802045341240000016880000487412516010016010080100344000504950330534105341043298206334336080100802001602005341078118020110099100801001000000511022411533921600001005341153411534115341153411
802045341040000058380000487412516010016010080100344000514950330534105341043298206334336080100802001602005341078118020110099100801001000000511012411533921600001005341153411534115341153411
80204534104000006180000487412516010016010080100344000514950330534105341043298206334336080100802001602005341078118020110099100801001000000511012411533921600001005341153411534115341153411
802045341040000048380000487412516010016010080100344000504950330534105341043298206334336080100802001602005341078118020110099100801001000000511012411533921600001005341153411534115341153411
802045341040000055180000487412516010016010080100344000514950330534105341043298204934336080100802001602005341078118020110099100801001000000511012411533921600001005341153411534115341153411
802045341039900039980000487412516010016010080100344000504950330534105341043298206034336080100802001602005341078118020110099100801001000000511012411533921600001005341153411534115341153411
802045341039900061480000487412516010016010080100344000504950330534105341043298206034336080100802001602005341078118020110099100801001000000511012411533921600001005341153411534115341153411
802045341040000060580000487412516010016010080100344000514950330534105341043298205034336080100802001602005341078118020110099100801001000000511012411533921600001005341153411534115341153411
802045341040000016680000487412516010016010080100344000514950330534105341043298205034336080100802001602005341078118020110099100801001000000511012411533921600001005341153411534115341153411
802045341040000010580000487412516010016010080100344000514950330534105341043367206334336080100802001602005341078118020110099100801001000000511012411533921600001005341153411534115341153411

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)5f60696a6b6d6emap 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)acbranch cond mispred nonspec (c5)cfl1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0? int output thing (e9)eaebec? int retires (ef)f5f6f7f8fd
80024534024000618000047946251600101600108001034381301049503000533805338043290270734335280010800201600205338078118002110910800101001410502001240001153359160000000105338153381533815338153381
8002453380400061800004794625160010160010800103438130004950300053380533804329025623433528001080020160020533807811800211091080010100150502001240001153359160000000105338153381533815338153381
8002453380399061800004794625160010160010800103438130004950300053380533804329025623433528001080020160020533807811800211091080010100180502001240001153359160000000105338153381533815338153381
80024533804000726800004794625160010160010800103438130004950300053380533804329027073433528001080020160020533807811800211091080010100120502001240011153359160000000105338153381533815338153381
800245338040006180000479462516001016001080010343813000495030005338053380432902707343352800108002016002053380781180021109108001010000502001240001153359160000000105338153381533815338153381
800245338039905368000047946251600101600108001034381300049503000533805338043290256234335280010800201600205338078118002110910800101001290502001240001153359160000000105338153381533815338153381
8002453380400061800004794625160010160010800103438130004950300053380533804329027073433528001080020160020533807811800211091080010100990502001240001153359160000000105338153381533815338153381
8002453380399061800004794625160010160010800103438130004950300053380533804329027073433528001080020160020533807821800211091080010100270502001240001153359160000000105338153381533815338153381
800245338039906180000479462516001016001080010343813010495030005338053380432902707343352800108002016002053380781180021109108001010090502001240001153359160000000105338153381533815338153381
800245338040006180000479462516001016001080010343813010495030005338053380432902628343352800108002016002053380781180021109108001010090502001240001153359160000000105338153381533815338153381