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

Test 1: uops

Code:

  cmn x0, x1, lsr #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)03093f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)606b6d6emap 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
1004709506110003042520002000100040877007097094982535611000100020007097811100110000073222226842000710710710710710
1004709506110003042520002000100040877007097094982135611000100020007097811100110000073222226842000710710710710710
1004709606110003042520002000100040877007097094982535611000100020007097811100110000073222226842000710710710710710
1004709506110003042520002000100040877007097094982135611000100020007097811100110000073222226842000710710710710710
1004709516110003042520002000100040877007097094982135611000100020007097811100110000073222226842000710710710710710
1004709506110003042520002000100040877007097094982535611000100020007097811100110000073222226842000710710710710710
1004709606110003042520002000100040877007097094982135611000100020007097811100110000073222226842000710710710710710
1004709506110003042520002000100040877007097094982135611000100020007097811100110000073222226842000710710710710710
1004709508210003042520002000100040877007097094982135611000100020007097811100110000073222226842000710710710710710
1004709506110003042520002000100040877007097094982535611000100020007097811100110000073222226842000710710710710710

Test 2: Latency 3->1

Chain cycles: 1

Code:

  cmn x0, x1, lsr #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)18191e3f4c4d51schedule 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 access (a0)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202043003522400006110000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100000015913101231222995430000101003003630036300363003630036
2020430035225000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000000313101231222995430000101003003630036300363003630036
2020430035225000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000000313101231222995430000101003003630036300363003630036
2020430035225000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000000313101231222995430000101003003630036300363003630036
2020430035225000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000000613101231222995430000101003003630036300363003630036
2020430035225031061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000101313101231222995430000101003003630036300363003630036
2020430035225000361100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000000613101231222995430000101003003630036300363003630036
202043003522500006110000298932530100301002010019561984926955300353003527369327478201002020030200300351451120201100991002010010100000014713101231222995430000101003003630036300363003630036
2020430035224000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000000613101231222995430000101003003630036300363003630036
2020430035224000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000000613101231222995430000101003003630036300363003630036

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)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 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
20024300352250266100002989125300103001020010195628949269553003530035273913274982001020020300203003514511200211091020010100100000127414338132995830000100103003630036300363003630036
200243003522502661000029891253001030010200101956289492695530035300352739132749820010200203002030035145112002110910200101001000001274153312132995830000100103003630036300363003630036
200243003522502661000029891253001030010200101956289492695530035300352739132749820010200203002030035145112002110910200101001000001274143313142995830000100103003630036300363003630036
2002430035225327311000029891253001030010200101956289492695530035300352739132749820010200203002030035145112002110910200101001000001274143312142995830000100103003630036300363003630036
200243003522502661000029891253001030010200101956289492695530035300352739132749820010200203002030035145112002110910200101001000001274143314132995830000100103003630036300363003630065
200243003522502661000029891253001030010200101956289492695530035300352739132749820010200203002030035145112002110910200101001000001274143313122995830000100103003630036300363003630036
2002430035225023511000029891253001030010200101956289492695530035300352739132749820010200203002030035145112002110910200101001000001274133314132995830000100103003630036300363003630036
2002430035225027311000029891253001030010200101956289492695530035300352739132749820010200203002030035145112002210910200101001000001274133312142995830000100103003630036300363003630036
20024300352250266100002989125300103001020010195628949269553003530035273913274982001020020300203003514511200211091020010100100000127413336132995830000100103003630036300363003630036
200243003522502661000029891253001030010200101956289492695530035300352739132749820010200203002030035145112002110910200101001000001274133314132995830000100103003630036300363003630036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  cmn x0, x1, lsr #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)03181e1f3a3f4c4d51schedule 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)ld unit uop (a6)l1d cache writeback (a8)accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202043003522500015371000029893253010030100201001956198049269553003530035273693274782019920200303343008114521202011009910020100101007400013101231222995430000101003003630036300363003630036
20204300352250000611000029893253010030100201001956198149269553003530035274003274782010020200302003003514511202011009910020100101000000013101231222995430000101003003630036300363003630036
20204300352250000611000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000000013101231222995430000101003003630036300363003630036
20204300352250000611000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000001613101231222995430000101003003630036300363003630036
202043003522500007261000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000000013101231222995430000101003003630036300363003630036
20204300352250000611000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000020013101231222995430000101003003630036300363003630036
20204300352240000611000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000000013101231222995430000101003003630036300363003630036
20204300352250000611000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000000013101231222995430000101003003630036300363003630036
20204300352250000611000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000000013101231222995430000101003003630036300363003630036
20204300352250000611000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000000313101231222995430000101003003630036300363003630036

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)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)acbranch mispred nonspec (cb)cfl1i cache miss demand (d3)d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2002430035225061100002989125300103001020010195628900492695530035300352739132749820010200203002030035145112002110910200101001000012700133112995830000100103003630036300363003630036
2002430035225061100002989125300103001020010195628900492695530035300352739132749820010200203002030035145112002110910200101001013012700133112995830000100103003630036300363003630036
20024300352250499100002989125300103001020010195628900492695530035300352739132749820010200203002030035145112002110910200101001000012700233112995830000100103003630036300363003630036
20024300352250156100002989125300103001020010195628900492695530035300352739132749820010200203002030035145112002110910200101001000012700133112995830000100103003630036300363003630036
20024300352250726100002989125300103001020010195628900492695530035300352739132749820010200203002030035145112002110910200101001000012700133112995830000100103003630036300363003630036
20024300352250726100002989125300103001020010195628900492695530035300352739132749820010200203002030035145112002110910200101001000012700133112995830000100103003630036300363003630036
2002430035225061100002989125300103001020010195628900492695530035300352739132749820010200203002030035145112002110910200101001000012700133112995830000100103003630036300363003630036
2002430035225061100002989125300103001020010195628901492695530035300352739132749820010200203002030035145112002110910200101001000012700133112995830000100103003630036300363003630036
20024300352250251100002989125300103001020010195628900492695530035300352739132749820010200203002030035145112002110910200101001000012700133112995830000100103003630036300363003630036
2002430035224061100002989125300103001020010195628911492695530035300352739132749820010200203002030035145112002110910200101001000012700133112995830000100103003630036300363003630036

Test 4: throughput

Count: 8

Code:

  cmn x0, x1, lsr #17
  cmn x0, x1, lsr #17
  cmn x0, x1, lsr #17
  cmn x0, x1, lsr #17
  cmn x0, x1, lsr #17
  cmn x0, x1, lsr #17
  cmn x0, x1, lsr #17
  cmn x0, x1, lsr #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)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)l1d tlb miss (a1)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802045341240000000006180000487412516010016010080100344000504950330534105341043298206034336080100802001602005341078118020110099100801001000000000511042434533921600001005341153411534115341153411
8020453410400000000016880000487412516010016010080100344000504950330534105341043298205034336080100802001602005341078118020110099100801001000000000511042444533921600001005341153411534115341153411
8020453410400000000012480000487412516010016010080100344000504950330534105341043298205034336080100802001602005341078118020110099100801001000000000511032444533921600001005341153411534115341153411
8020453410400000000027180000487412516010016010080100344000504950330534105341043298206034336080100802001602005341078118020110099100801001000000000511042444533921600001005341153411534115341153411
8020453410400000000023380000487412516010016010080100344000504950330534105341043298206334336080100802001602005341078118020110099100801001000000060511042434533921600001005341153411534115341153411
8020453410400000000032180000487412516010016010080100344000504950330534105341043298206034336080100802001602005341078118020110099100801001000000000511042445533921600001005346853627534115341153522
8020453469400000090062480000487412516010016010080100344000504950330534105341043298206334336080100802001602005341078118020110099100801001000000100511032443533921600001005341153411534115341153524
8020453410400000090038380000487412516010016010080100344000504950330534105341043298206034336080100802001602005341078118020110099100801001000000030511042443533921600001005341153411534115341153411
8020453410400000033006180000487413716010016010080100344000504950330534105341043298206034336080100802001602005341078118020110099100801001000000000511042434533921600001005341153411534115341153411
802045341040000000006180000487412516010016010080100344000504950330534105341043298205034336080100802001602005341078118020110099100801001000000000511042454533921600001005341153411534115341153411

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)09l2 tlb miss data (0b)18191e1f3f4c4d51schedule 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 tlb access (a0)ld unit uop (a6)l1d cache writeback (a8)a9acbranch mispred nonspec (cb)cdcfd0d2d5map dispatch bubble (d6)daddfetch restart (de)e0? int output thing (e9)eb? int retires (ef)f5f6f7f8fd
80024534014000000019206180000479462516001016001080010343813000495030053380533804329025623433528001080020160020533807811800211091080010100000000502000324032533591600000105338153381533815338153381
8002453380399000002706180000479462516001016001080010343813000495030053380533804329027073433728001080020160020533807811800211091080010100000000502000224033533591600000105338153381533815338153381
80024533803990000042061800004794625160010160010800103438130104950300533805338043290256234335280010800201600205338078118002110910800101000000005020503241235335916000016105338153381533815338153381
80024533804001000027081680000479462516001016001080010343813000495030053380533804329027073433528001080020160020533807811800211091080010100070000502000324023533591600000105338153381533815338153381
8002453380400000002706180000479462516001016001080010343813000495030053380533804329025623433528001080020160020533807811800211091080010100000000502000324032533591600000105338153381533815338153381
8002453380400000002706180000479462516001016001080010343813000495030053380533804329027073433528001080020160020533807811800211091080010100000000502000324033533591600000105338153381533815338153381
8002453380400000004806180000479462516001016001080010343813000495030053380533804329025623433528001080020160020533807811800211091080010100000000502000324023533591600000105338153381533815338153381
8002453380400000002706180000479462516001016001080010343813000495030053380533804329027073433528001080020160020533807811800211091080010100000010502000224033533591600000105338153381533815338153381
800245343240000000006180000479462516001016001080010343813000495030053380533804329025623433528001080020160020533807811800211091080010100000000502000224023533591600000105338153381533815338153381
8002453380399000003906180000479462516001016001080010343813000495030053380533804329027073433528001080020160020533807811800211091080010100000000502000324332533591600000105338153381533815338153381