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

Test 1: uops

Code:

  cmn w0, w1, lsl #17
  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)03mmu table walk data (08)1e3f4c4d51schedule 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)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
1004709500661000304252000200010004087770970949825356110001000200070978111001100000073122116842000710710710710710
1004709500841000304252000200010004087770970949825356110001000200070978111001100000073122116842000710710710710710
1004709500611000304252000200010004087770970949825356110001000200070978111001100000073122116842000710710710710710
1004709500611000304252000200010004087770970949825356110001000200070978111001100000073122116842000710710710710710
1004709500611000304252000200010004087770970949821356110001000200070978111001100000073122116842000710710710710710
10047095006110003042520002000100040877709709498253561100010002000709781110011000015073122116842000710710710710710
1004709500611000304252000200010004087770970949825356110001000200070978111001100000073122116842000710710710710710
1004709500611000304252000200010004087770970949821356110001000200070978111001100000073122116842000710710710710710
1004709500611000304252000200010004087770970949821356110001000200070978111001100000073122116842000710710710710710
1004709500611000304252000200010004087770970949821356110001000200070978111001100000073122116842000710710710710710

Test 2: Latency 3->1

Chain cycles: 1

Code:

  cmn w0, w1, lsl #17
  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)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)9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache writeback (a8)a9acc2cdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202043003522500039061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000000013101331222995430000101003003630036300363003630036
20204300352250000061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000000013101231232995430000101003003630036300363003630036
20204300352250000061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000000013101231222995430000101003003630036300363003630036
20204300352240000061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000000013101231222995430000101003003630036300363003630036
20204300352250000061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000030013101231222995430000101003003630036300673003630036
20204300352250000061100002989325301003010020100195619804926955300353003527369327500201002020030200300351451120201100991002010010100000000013101331222995430000101003003630036300363003630036
20204300352250000061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000000013101231222995430000101003003630036300363003630036
20204300352250000061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000000013101231222995430000101003003630036300363003630036
20204300352250000061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000000013101231222995430000101003003630036300363003630036
20204300352250000061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000000013101231222995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e1f3f4c4d51schedule 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)accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024300352250061100002989125300103001020010195628914926955030035300352739132749820010200203002030035145112002110910200101001026001270133332995830000100103003630036300683003630036
20024300352250061100002989125300103001020010195628904926955030035300352739132749820010200203002030035145112002110910200101001074001270333432995830000100103003630036300363003630036
20024300352270061100002989125300103001020010195628904926955030035300352739132749820010200203002030035145112002110910200101001034901270333332995830000100103003630036300363003630036
20024300352250061100002989125300103001020010195628904926955030035300352739132749820010200203002030035145112002110910200101001031301270233112995830000100103003630036300363003630036
20024300352250061100002989125300103001020010195628904926955330035300352739132749820010200203002030035145112002110910200101001005701270333432995830000100103003630036300363003630036
20024300352240061100002989125300103001020010195628904926955030035300352739132749820010200203002030035145112002110910200101001010001270233222995830000100103003630036300363003630036
20024300352250061100002989125300103001020010195628904926955030035300352739132749820010200203002030035145112002110910200101001028301270333332995830000100103003630036300363003630036
20024300352250061100002989125300103001020010195628904926955030035300352739132749820010200203002030035145112002110910200101001024001270333232995830000100103003630036300363003630036
20024300352250061100002989125300103001020010195628904926955030035300352739132749820010200203002030035145112002110910200101001031301270233222995830000100103003630036300363003630036
20024300352240061100002989125300103001020010195628904926955030035300352739132749820010200203002030035145112002110910200101001058401270333342995830000100103003630036300673003630036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  cmn w0, w1, lsl #17
  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)03191e1f3f4c4d51schedule 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 cache writeback (a8)acbranch cond mispred nonspec (c5)cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2020430035225000611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000013101431222995430000101003003630036300363003630036
2020430035225000611000629897253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
2020430035225000611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
2020430035225000611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
2020430035225090611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
2020430035225000611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
2020430035225000611000029893253010030100201001956198492700130035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
2020430035225000611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
2020430035225000611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630036300363003630036
2020430035225000611000029893253010030100201001956198492695530035300352736932747820100202003020030035145112020110099100201001010000013101231222995430000101003003630067300363003630036

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)09191e1f3f4c4d51schedule 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 cache writeback (a8)acbranch cond mispred nonspec (c5)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024300352240000010310000298912530010300102001019562894926955030035300352739132749820010200203002030035145112002110910200101001016001270133112995830016100103003630036300813003630036
20024300352251111328810310000298912530010300102008919562894927001030035300352739132749820010200203002030035145112002110910200101001006001270133112995830000100103003630036300363003630036
20024300352240000061100002989125300103001020010195628949269553300353003527391327498200102002030020300351451120021109102001010010018001270133112995830000100103003630036300363003630036
2002430035226000006110000298914730010300102001019562894926955030035300352739132749820010200203002030035145112002110910200101001000001270133212995830000100103003630036300363003630036
200243003522500027606110000298912530010300102001019562894926955030035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
2002430035225000006110000298912530010300102001019562894926955030035300352739132749820010200203002030035145112002110910200101001050001270133112995830000100103003630036300363003630036
20024300352250000061100002989125300103001020010195628949269550300353003527391327498200182002030020300351451120021109102001010010513001270133112995830000100103003630036300363003630036
20024300352250000061100002989125300103001020010195628949269550300353003527391327498200102002030020300351451120021109102001010010360001270133112995830000100103003630036300363003630036
2002430035225000006110000298912530010300102001019562894926955030035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
20024300352250000061100002989125300103001020010195628949269550300353003527391327498200102002030020300351451120021109102001010010623001270133112995830000100103003630036300363003630036

Test 4: throughput

Count: 8

Code:

  cmn w0, w1, lsl #17
  cmn w0, w1, lsl #17
  cmn w0, w1, lsl #17
  cmn w0, w1, lsl #17
  cmn w0, w1, lsl #17
  cmn w0, w1, lsl #17
  cmn w0, w1, lsl #17
  cmn w0, w1, lsl #17
  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)181e1f3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)696a6b6d6emap 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)a9acc2cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80204534554000000061800004874125160100160100801003440005495033005341053410432982063343360801008020016020053410781180201100991008010010000901800511032422533921600001005341153411534115341153411
8020453410400000006180000487412516010016010080100344000549503300534105341043298206334336080100802001602005341078118020110099100801001000020000511022422533921600001005341153411534115341153411
8020453410400000906180000487412516010016010080100344000549503300534105341043298205034336080100802001602005341078118020110099100801001000070000511022422533921600001005341153411534115341153411
80204534104000000010380000487412516010016010080100344000549503300534105341043298206334336080100802001602005341078118020110099100801001000020000511022422533921600001005341153411534115341153411
80204534104000000061800004874125160100160100801003440005495033005341053410432982063343360801008020016020053410781180201100991008010010000100000511022422533921600001005341153411534115341153411
80204534104000000025180000487412516010016010080100344000549503300534105341043298206034336080100802001602005341078118020110099100801001000030000511022422533921600001005341153411534115341153411
8020453410400000006180000487413816010016010080100344000549503300534105341043298206334336080100802001602005341078118020110099100801001000000300511022422533921600001005341153411534115341153411
802045341040200000618000048741251601001601008010034400054950330053410534104329820503433608010080200160200534107811802011009910080100100003301200511022422533921600001005341153411534115341153411
8020453410400000008280000487412516010016010080100344000549503300534105341043298206034336080100802001602005341078118020110099100801001000040000511022422533921600001005341153411534115341153411
8020453410400000006180000487412516010016010080100344000549503300534105341043298206334336080100802001602005341078118020110099100801001000080000511022422533921600001005341153411534115345553411

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03091e1f3f4c4d51schedule 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)9fld unit uop (a6)l1d cache writeback (a8)a9acc2cfd2l1i cache miss demand (d3)d5map dispatch bubble (d6)dadbddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800245340240000061800004794625160010160010800103438130049503000533805338043290270734335280010800201600205338078118002110910800101000000502000182400151553359160000105338153381533815338153381
800245338040000014358000047946251600101600108001034381300495030005338053380432902562343352800108002016002053380781180021109108001010000005020005240015553359160000105338153381533815338153381
800245338040000061800004794625160010160010800103438130049503000533805338043290270734335280010800201600205338078118002110910800101000000502000152400151553359160000105338153381533815338153381
80024533804000002518000047946251600101600108001034381300495030005338053380432902707343352800108002016002053380781180021109108001010023000502000152400151553401160000105338153381533815338153381
8002453380400000618000047946251600101600108001034381301495030005338053380432902562343352800108002016002053380781180021109108001010000005020005240015553359160000105338153381533815338153381
8002453380400000726800004794625160010160010800103438130049503000533805338043290270734335280010800201600205338078118002110910800101000000502000152400151553359160000105338153381533815338153381
8002453380399000618000047946251600101600108001034381300495030005338053380432902707343352800108002016002053380781180021109108001010000005020005240015553359160000105338153381533815338153381
80024533803990007268000047946251600101600108018434381300495030005338053380432902707343352800108002016002053380781180021109108001010000005020005240015553359160000105338153381533815338153381
80024533804000171061800004794625160010160010800103438130049503000533805338043290270734335280010800201600205338078118002110910800101001000502011152400151553359160000105338153381533815338153381
8002453380400000618000047946251600101600108001034381300495030005338053380432902707343352800108002016002053380781180021109108001010000005020005240015553359160000105338153381533815338153381