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

Test 1: uops

Code:

  cmn w0, w1, 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)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
10047095061100030425200020001000408771709709498253561100010002000709781110011000073122116842000710710710710710
10047095061100030425200020001000408771709709498213561100010002000709781110011000073122116842000710710710710710
10047095061100030425200020001000408771709709498253561100010002000709781110011000073122116842000710710710710710
10047095061100030425200020001000408771709709498253561100010002000709781110011000073122116842000710710710710710
10047095061100030425200020001000408771709709498253561100010002000709781110011000073122116842000710710710710710
10047095061100030425200020001000408771709709498213561100010002000709781110011000073122116842000710710710710710
10047095061100030425200020001000408771709709498253561100010002000709781110011000073122116842000710710710710710
10047096061100030425200020001000408771709709498213561100010002000709781110011000073122116842000710710710710710
10047095061100030425200020001000408771709709498213561100010002000709781110011000073122116842000710710710710710
100470961261100030425200020001000408771709709498213561100010002000709781110011000073122116842000710710710710710

Test 2: Latency 3->1

Chain cycles: 1

Code:

  cmn w0, w1, 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)03191e1f3a3f4c4d51schedule 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)accdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2020430035225000061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000013101231322995430000101003003630036300363003630036
20204300352250000103100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
2020430035225000084100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
2020430035225000061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000013101231232995430000101003003630036300363003630036
2020430035225000061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000013101331222995430000101003003630036300363003630036
2020430035224000061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000013101231322995430000101003003630036300363003630036
2020430035225000061100002989325301003010020100195619814926955300353003527369327478201002020030200300351451120201100991002010010100000013101331232995430000101003003630036300363003630036
2020430035225000061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000013101231252995430000101003003630036300363003630036
20204300352250000103100002989325301003010020100195691304927000300353003527369327478201002020030200300351452120201100991002010010100000013101231232995430000101003003630036300363003630036
20204300352250000395100002989325301003016720100195687704926955300353003527369327478201002020030200300351451120201100991002010010100000013101231232995430000101003003630036300363003630036

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)1e3f4c4d51schedule 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)ld unit uop (a6)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024300352250082100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010000001270333222995830000100103003630036300363003630036
20024300352250061100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010000001270233222995830000100103003630036300363003630036
20024300352250061100002991025300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010001001270233232995830000100103003630036300363003630036
20024300352250061100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010000001270233222995830000100103003630036300363003630036
20024300352250061100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010000001270233222995830000100103003630036300363003630036
20024300352250061100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010000001270233222995830000100103003630036300363003630036
20024300352250061100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010000001270233222995830000100103003630036300363003630036
20024300352250061100002990725300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010100001270233232995830000100103003630036300363003630036
20024300352250061100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010000001270233222995830000100103003630036300363003630036
20024300352250061100002989125300103001020010195628904926955300353003527391327498200102002030020300351452120021109102001010010000001270233222995830000100103003630036300363003630036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  cmn w0, w1, 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)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)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 tlb access (a0)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20204300352250000039061100002989925301003010020107195624014926955030035300352739162748720107202243023630035145112020110099100201001010000000011113180116112998130000101003003630036300363003630036
2020430035225000006061100002989925301003010020107195624014926955030035300352739162748720107202243023630035145112020110099100201001010000000011113180116212998130000101003003630036300363003630036
2020430035225000000061100002989925301003010020107195624014926955030035300352739162748720107202243023630035145112020110099100201001010000000011113180116112998130000101003003630036300363003630036
2020430035224000006061100002989925301003010020107195624014926955030035300352739162748720107202243023630035145112020110099100201001010000000011113180116112998130000101003003630036300363003630036
202043003522500000252061100002989925301003010020107195624014926955030035300352736932747820100202003020030035145112020110099100201001010000000000013101231222995430000101003003630036300363003630036
202043003522500000420061100072989325301003010020100195619814926955030035300352736932747820100202003020030035145112020110099100201001010000000000013101231222995430000101003003630036300363003630036
202043003522500000120103100002989325301003019020100195619814926955030035300352736932747820100202003020030035145112020110099100201001010000000000013101231222995430000101003003630036300363003630036
2020430035225000000061100002989325301003010020100195619814926955030035300352736932747820100202003020030035145112020110099100201001010000000000013101231222995430000101003003630036300363003630036
202043003522500000276061100002989325301003010020100195619814926955030035300352736932747820100202003020030035145112020110099100201001010000000000013101231222995430000101003003630036300363003630036
2020430035225000000061100002989325301003010020100195619814926955030035300352736932747820100202003020030035145112020110099100201001010000000000013101231222995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)033a3f4c4d51schedule 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)st unit uop (a7)l1d cache writeback (a8)a9branch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2002430035225266100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010000001274173313132995830000100103003630036300363003630036
2002430035225266100002989125300103001020010195628904926955300663003527391327498200102002030020300351451120021109102001010010000001274143314142995830000100103003630036300363003630036
2002430035225266100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010000001274153315152995830000100103003630036300363003630036
2002430035224266100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010000001274143317152995830000100103003630036300363003630036
2002430035225266100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010000001274153316142995830000100103003630036300363003630036
2002430035225266100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010000001274143314162995830000100103003630036300363003630036
2002430035225266100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010000001274133314142995830000100103003630036300363003630036
200243003522528710000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000000127415331492995830000100103003630036300363003630036
2002430035224266100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010001001274123314162995830000100103003630036300363003630036
2002430035225266100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010000001274133314122995830000100103003630036300363003630036

Test 4: throughput

Count: 8

Code:

  cmn w0, w1, lsr #17
  cmn w0, w1, lsr #17
  cmn w0, w1, lsr #17
  cmn w0, w1, lsr #17
  cmn w0, w1, lsr #17
  cmn w0, w1, lsr #17
  cmn w0, w1, lsr #17
  cmn w0, w1, 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)18191e1f3f4c4d51schedule 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)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802045343339900000061800004874125160100160100801003440005149503300534105341043298206334336080100802001602005341078118020110099100801001000000000511032472533921600001005341153411534115341153411
802045341040000000061800004874125160100160100801003440005049503300534105341043298205034336080100802001602005341078118020110099100801001000000000511022422533921600001005341153411534115341153411
802045341040000000061800004874125160100160100801003440005049503300534105341043298205034336080100802001602005341078118020110099100801001000000000511022422533921600001005341153411534115341153411
802045341040000000061800004874125160100160100801003440005049503300534105341043298206334336080100802001602005341078118020110099100801001000000000511022422533921600001005341153411534115341153411
802045341040000000061800004874125160100160100801003440005049503300534105341043298206334349080100802001602005341078118020110099100801001000000000511022422533921600001005341153411534115341153411
802045341040000000061800004664125160100160100801003440005049503300534105341043298205034336080100802001602005341078118020110099100801001000000000511022422533921600001005341153411534115341153411
802045341040000000061800004874125160100160100801003440005149503300534105341043298202134336080100802001602005341078118020110099100801001000000000511022422533921600001005341153411534115341153411
802045341040000000061800004874125160100160100801003440005149503300534105341043298206334336080100802001602005341078118020110099100801001000000000511022422533921600001005341153411534115341153411
802045341039900000061800004874125160100160100801003440005149503300534105341043298206334336080100802001602005341078118020110099100801001000000000511022422533921600001005341153411534115341153411
8020453410400000000726800004874125160100160100801003440005049503303534105341043298206034336080100802001602005341078118020110099100801001000000000511022422533921600001005341153411534115341153411

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu 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)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)eb? int retires (ef)f5f6f7f8fd
8002453401399000000006180000479462516001016001080010343813014950300533805338043290270734335280010800201600205338078118002110910800101000000005020524455335916000042105338153381533815338153381
80024533804000000000072680000479462516001016001080010343813014950300533805338043290270734335280010800201600205338078118002110910800101000000005020524665335916000010105338153381533815338153381
800245338039900000000618000047946251600101600108001034381301495030053380533804329025623433528001080020160020533807811800211091080010100000000502072476533591600000105338153381533815338153381
800245338040000000000618000047946251600101600108001034381300495030053380533804329027073433528001080020160020533807811800211091080010100000000502072455533591600000105338153381533815338153381
800245338040000000000618000047946251600101600108001034381301495030053380533804329027073433528001080020160020533807811800211091080010100000000502052455533591600000105338153381533815338153381
800245338039900000000618000047946251600101600108001034381301495030053484533804329027073433528001080020160020533807811800211091080010100000000502042466533591600000105338153381533815338153381
8002453380400000000007268000047946251600101600108001034381301495030053380533804329025623433528001080020160020533807811800211091080010100000000502052476533591600000105338153381533815338153381
800245338040000000000618000047946251600101600108001034381301495030053380533804329027073433528001080020160020535927811800211091080010100000230502052454533591600000105338153381533815338153381
800245338040000000000618000047946251600101600108001034381300495030053591533804329027073433528001080020160020533807811800211091080010100000000502062466533591600000105338153381533815338153381
8002453380399000000006180000479462516001016001080010344192614950300533805338043290271934335280010802321600205338078118002110910800101000000005020524565335916000010105338153381533815338153381