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

CMP (sxtb, 64-bit)

Test 1: uops

Code:

  cmp 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)033f4c4d51schedule 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
1004709561100030425200020001000408770709709498213561100010002000709781110011000073222226842000710710710710710
1004709561100030425200020001000408770709709498213561100010002000709781110011000073222226842000710710710710710
1004709561100030425200020001000408770709709498253561100010002000709781110011000073222226842000710710710710710
1004709561100030425200020001000408770709709498213561100010002000709781110011000073222226842000710710710710710
1004709561100030425200020001000408770709709498253561100010002000709781110011000073222226842000710710710710710
1004709661100030425200020001000408770709709498253561100010002000709781110011000073222226842000710710710710710
1004709561100030425200020001000408770709709498213561100010002000709781110011000073222226842000710710710710710
1004709561100030425200020001000408770709709498213561100010002000709781110011000073222226842000710710710710710
1004709561100030425200020001000408770709709498213561100010002000709781110011000073222226842000710710710710710
1004709561100030425200020001000408770709709498213561100010002000709781110011000073222226842000710710710710710

Test 2: Latency 3->1

Chain cycles: 1

Code:

  cmp 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)03mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)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)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)branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202043003522510100000268100002989325301003010020100195619814926955300353003527369327478201002020030200300351451120201100991002010010100000013141031882995430000101003003630036300363003630036
20204300352251010000026810000298932530100301002010019561981492695530035300352736932747820100202003020030035145112020110099100201001010000001314831892995430000101003008130036300363003630036
20204300352251010000026810000298932530100301002010019561981492695530035300352736932747820100202003020030035145112020110099100201001010000001314431592995430000101003003630036300363003630036
20204300352251010000026810000298932530100301002010019561980492695530035300352736932747820100202003020030035145212020110099100201001010000001314831782995430000101003003630036300363003630036
202043003522410100000268100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000013148317102995430000101003006730036300363003630036
20204300352251010000026810000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000001314817782995430000101003003630036300363007130036
20204300352251010000026810000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000001314831782995430000101003003630036300363003630036
20204300352251010000026810000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000001314931882995430000101003003630036300363003630036
20204300352251010000026810000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000001314831892995430000101003003630036300363003630036
20204300352251010000026810000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000001314831782995430000101003003630036300363003630036

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)181e1f3f4c4d51schedule 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 cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024300352250000212100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
20024300352250000212100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010001270233112995830000100103003630036300363003630036
200243003522500120168100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
2002430035225000061100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630082300363008230036
2002430035225000061100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
2002430035225000061100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
2002430035225000061100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
20024300352250000147100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
20024300352250000126100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
2002430035225000061100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  cmp 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 data (08)09l2 tlb miss data (0b)181e1f3f4c4d51schedule 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)9fld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc2cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202043003522500001506110000298932530100301002010019561984926955030035300352736932747820100202003020030035145112020110099100201001010000003013101331222995430000101003003630036300363003630036
202043003522500001806110000298932530100301002010019561984926955030035300352736932747820100202003020030035145112020110099100201001010000000013101231222995430000101003006730036300363003630036
20204300352250000606110000298932530100301002010019561984926955030035300352736932747820100202003020030035145112020110099100201001010000000213101231222995430000101003003630036300363003630036
202043003522500001806110000298932530100301002010019561984926955030035300352736932747820100202003020030035145112020110099100201001010000000013101231222995430000101003003630036300363003630036
20204300352250000606110000298932530100301002010019561984926955030035300352736932747820100202003020030035145112020110099100201001010000000013101231222995430000101003003630036300363003630036
2020430035224000041706110000298932530100301002010019561984926955030035300352736932747820100202003020030035145112020110099100201001010000000013101231222995430000101003003630036300363003630036
20204300352250000606110000298932530100301002010019561984926955030035300352736932747820100202003020030035145112020110099100201001010000000013101231222995430000101003003630036300363003630036
202043003522500006606110000298932530100301002010019561984926955030035300352736932747820100202003020030035145112020110099100201001010000000013101231222995430000101003003630036300363003630036
2020430035225000036006110000298932530100301002010019561984926955030035300352736932747820100202003020030035145112020110099100201001010000000013101231222995430000101003003630036300363003630036
20204300352250000606110000298932530100301002010019561984926955030035300352736932747820100202003020030035145112020110099100201001010000000013101231222995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)033f4c4d51schedule 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 cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200243003522561100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
200243003522584100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
200243003522561100002989125300103001020010195628914926955300703003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
200243003522584100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010201270133112995830000100103003630036300363003630036
200243003522561100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010001270133122995830000100103008130036300363008130036
200243003522561100002989725300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
200243003522561100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
200243003522561100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
2002430035225314100002989125300103001020010195628904926955300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
2002430035225726100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010031270133112995830000100103003630036300363003630036

Test 4: throughput

Count: 8

Code:

  cmp x0, w1, sxtb
  cmp x0, w1, sxtb
  cmp x0, w1, sxtb
  cmp x0, w1, sxtb
  cmp x0, w1, sxtb
  cmp x0, w1, sxtb
  cmp x0, w1, sxtb
  cmp 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)03mmu table walk data (08)09l2 tlb miss data (0b)181e1f3f4c4d51schedule 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 cache writeback (a8)acc2c3branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80204534574000000150618000048741251601001601008010034400050495033053410534104329820633433608010080200160200534107851802011009910080100100200000511022411533921600001005341153411534115341153411
802045341040000001806318000048741251601001601008010034400050495033053629534104329820603433608010080200160200534107811802011009910080100100000000516212411533921600001005341153411534115341153411
802045341040000002760618000048741251601001601008010034400050495033053410534104329820503433608010080200160200534107811802011009910080100100000000511012411533921600001005341153411534115341153411
8020453410400000046506180000487412516010016010080100344000504950330534105341043298206334336080100802001602005341078118020110099100801001000112000511012411533921600001005341153411534115341153411
802045341040000002070618000048741251601001601008010034400050495033053410534104329820633433608010080200160200534107811802011009910080100100000000511012413533921600001005341153411534115341153411
802045341040000002460848000048741251601001601008010034400050495033053410534104329820633433608010080200160200534107811802011009910080100100000000511012411533921600001005341153411534115341153411
80204534104000000270618000048741251601001601008010034400050495033053410534104329820603433608010080200160200534107811802011009910080100100000000511012411533921600001005341153411534115341153411
802045341040000004500618000048741251601001601008010034400050495033053410534104329820633433608010080200160200534107811802011009910080100100000000511012411533921600001005341153411534115341153411
8020453410400000044701038000048741251601001601008031534400050495033053626534104329820503433608010080200160200534107811802011009910080100100010000511012411533921600001005341153411534115341153411
80204534103990000988618000048741251601001601008010034400050495033053410534104329820503433608010080200160200534107811802011009910080100100000000511012411533921600001005341153411534115341153411

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)9fl1d tlb access (a0)l1d cache writeback (a8)acbranch mispred nonspec (cb)cfd5map dispatch bubble (d6)daddfetch restart (de)e0? int output thing (e9)ea? int retires (ef)f5f6f7f8fd
8002453383400061800004794625160010160010800103438130014950300533805338043290256234335280010800201600205338078118002110910800101000005020152471211533591600000105338153381533815338153381
8002453380400061800004794625160010160010800103438130004950300533805338043290256234335280010800201600205338078118002110910800101000305020132451111533591600000105338153381533815338153381
8002453380400061800004794625160010160010800103438130014950300533805338043290270734335280010800201600205338078118002110910800101000005020132451010533591600000105338153381533815338153381
8002453380400061800004794625160010160010800103438130004950300533805338043290256234335280010800201600205338078118002110910800101000005020132461313533591600000105338153381533815338153381
8002453380399061800004794625160010160010800103438130024950300533805338043290256234335280010800201600205338078118002110910800101000005020122461212533591600000105338153381533815338153381
8002453380400061800004794625160010160010800103438130004950300533805338043290256234335280010800201600205338078118002110910800101000005020132461310533591600000105338153381533815338153381
8002453380400061800004794625160010160010800103438130004950300533805338043290256234335280010800201600205338078118002110910800101000005020132451311533591600000105338153381533815338153381
800245338040010261800004794625160010160010800103438130004950300534235338043290270734335280010800201600205338078118002110910800101000015020112461312533591600000105338153381533815338153381
8002453380400061800004794625160010160010800103438130004947271533805338043290270734335280010800201600205338078118002210910800101000005020122461211533591600000105338153381533815338153381
8002453380400061800004794625160010160010800103438130004950300533805338043290256234335280010800201600205338078118002110910800101000005020112451011533591600000105338153381533815338153381