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

Test 1: uops

Code:

  cmp 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)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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
100470950611000304252000200010004087717097094982135611000100020007097811100110001073322116842000710710710710710
100470950611000304252000200010004087717097094982135611000100020007097811100110000073122116842000710710710710710
100470960611000304252000200010004087717097094982135611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982135611000100020007097811100110000073222116842000710710710710710
100470950611000304252000200010004087717097094982135611000100020007097811100110000073222116842000710710710710710
100470950611000304252000200010004087717097094982135611000100020007097811100110000073222116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073222116842000710710710710710
100470960611000304252000200010004087717097094982135611000100020007097811100110000073122116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073222116842000710710710710710
100470950611000304252000200010004087717097094982535611000100020007097811100110000073122116842000710710710710710

Test 2: Latency 3->1

Chain cycles: 1

Code:

  cmp 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)09l2 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 tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202043003522500000001611000029899253010030100201071956240149269550300353003527391627487201072022430236300351451120201100991002010010100000260126011113180216222998130000101003003630036300363003630036
20204300352240000000161100002989925301003010020107195624004926955030035300352739162748720107202243023630035145112020110099100201001010000000150011113180216222998130000101003003630036300363003630036
20204300352250000000161100002989925301003010020107195624004926955030035300352739162748720107202243023630035145112020110099100201001010000000132011113180216222998130000101003003630036300363003630036
202043003522500000001611000029899253010030100201071956240149269550300353003527391627487201072022430236300351451120201100991002010010100000009011113180216222998130000101003003630036300363003630036
2020430035224000000011049100002989925301003010020107195624004926955030035300352739162748720107202243023630035145112020110099100201001010000000102000013101231222995430000101003003630036300363003630036
202043003522500000000601100002989325301003010020100195619814926955030035300352736932747820100202003020030035145112020110099100201001010000000168000013101231222995430000101003003630036300363003630036
202043003522500000000821000029893253010030100201001956198049269550300353003527369327478201002020030200300351451120201100991002010010100000000000013101231222995430000101003003630036300363003630036
2020430035224000000006110000298932530100301002010019561980492695503003530035273693274782010020200302003003514511202011009910020100101000000045000013101231222995430000101003003630036300363003630036
202043003522500000000611000029893253010030100201001956198149269550300353003527369327478201002020030200300351451120201100991002010010100000009000013101231222995430000101003003630036300363003630036
202043003522500000000251100002989325301003010020100195619814926955030035300352736932747820100202003020030035145112020110099100201001010000000159000013101231232995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)0318191e1f3f4c4d51schedule 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)a9acbranch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200243003522500006110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000001270233112995830000100103003630036300363003630036
200243003522400006110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
200243003522400006110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
200243003522500006110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
2002430035224000061100002989125300103001020010195628914926955300353003527391327498200102002030020300351451120021109102001010010001201270133112995830000100103003630036300363003630036
20024300352250001326110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
2002430035225000012410000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
200243003522500006110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
200243003522500006110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830002100103003630036300363003630036
200243003522500006110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  cmp 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)03l2 tlb miss data (0b)1e1f3f4c4d51schedule 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)ld unit uop (a6)l1d cache writeback (a8)accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202043003522500061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
202043003522500061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
202043003522500061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430037101003003630081300363003630036
2020430035225012883921000029893663016630143201001956198049269553012530080273811727478201892020030200300801451120201100991002010010100020313101231222995430000101003003630036300363003630036
202043003522500061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
202043003522500061100002989325301003010020100195688114926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
202043003522500061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
202043003522500061100002989325301003010020100195619814926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
202043003522400061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
202043003522500061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036

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)091e3f4c4d51schedule 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)9fld unit uop (a6)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024300352250006110000298912530010300102001019562890098269553003530035273913274982001020020300203003514511200211091020010100100301270133112995830000100103003630036300363003630036
20024300352250006110000298912530010300102001019562890149269553003530035273913274982001020020300203003514511200211091020010100100001270133212995830000100103003630036300363003630036
20024300352250006110000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100101270233112995830000100103003630036300363003630036
20024300352250006110000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100101270133112995830000100103003630036300363003630036
20024300352250006110000298912530010300102001019562890149269553003530035273913274982001020020300203003514511200211091020010100100101270133112995830000100103003630036300363003630036
20024300352250006110000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100031270133112995830000100103003630036300363003630036
200243003522500059610000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100001270133112995830000100103003630036300363003630036
20024300352250006110000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100001270133112995830000100103003630036300363003630036
20024300352250006110000298912530010300102001019562890049269553003530035273913274982001020020300203003514511200211091020010100100201270133212995830000100103003630036300363003630036
20024300352250006110000298912530010300102001019562890149269553003530035273913274982001020020300203003514511200211091020010100100001270133112995830000100103003630036300363003630036

Test 4: throughput

Count: 8

Code:

  cmp w0, w1, sxtb
  cmp w0, w1, sxtb
  cmp w0, w1, sxtb
  cmp w0, w1, sxtb
  cmp w0, w1, sxtb
  cmp w0, w1, sxtb
  cmp w0, w1, sxtb
  cmp 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)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)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)91inst 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
8020453454400000006180000487412516010016010080100344000504950330534105341043298206334336080100802001602005341078118020110099010080100100000511032411533921600001005341153411534115341153411
802045341040000000277580000487412516010016010080100344000504950330534105341043298206334336080100802001602005341078118020110099010080100100000511012411533921600001005341153411534115341153411
8020453410400000006180000487412516010016010080100344000514950330534105341043298206334336080100802001602005341078118020110099010080100100000511012411533921600001005341153411534115341153411
8020453410400000006180000487412516010016010080100344000514950330534105341043298206334336080100802001602005341078118020110099010080100100000514012411533921600001005341153411534115341153411
8020453410400000006180000487412516010016010080100344000514950330534105341043298199734336080100802001602005341078118020210099010080100100000511012411533921600001005341153411534115341153411
8020453410400000006180000487412516010016010080100344000504950330534105341043298206334336080100802001602005341078118020110099010080100100000511012411533921600001005341153411534115341153411
8020453410400000006180000487412516010016010080100344000514950330534105341043298206334336080100802001602005341078118020110099010080100100000511012411533921600001005341153411534115341153411
80204534104000000065780000487412516010016010080100344000514950330534105341043298205034335480219803141602005341078118020110099010080100100000511012411533921600001005421154265541005379254210
80204543114061161666014086180000487412516010016010080100344000514950330534105341043298206334336080100802001602005341078118020110099010080100100000511012411533921600001005341153411534115341153411
8020453410400000006180000487412516010016010080100344000504950330534105341043298206734336080100802001602005341078118020110099010080100100000511012411533921600001005341153411534115341153411

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03181e3f4c4d51schedule 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)l1d cache writeback (a8)accdcfd5map dispatch bubble (d6)dbddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8002453419399006180000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000000502032403353359160000105338153381533815338153381
8002453380400006180000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000000502032403253359160000105338153381533815338153381
8002453380400006180000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000000502032403453404160000105338153381534255338153381
8002453380400006180000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000000502032403253359160000105338153381533815338153381
8002453380400006180000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000000502022402353359160000105338153381533815338153381
8002453380400006180000479462516013316001080010343813004950300533805338043290256234335280010800201600205338078118002110910800101000000502032403353359160000105338153381533815338153381
8002453380400006180000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000000502032402353359160000105338153540533815338153433
8002453380400006180000479462516001016001080010343813014950300533805338043290256234335280010800201600205338078118002110910800101000000502032402353359160000105338153381533815338153381
8002453380399006180000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000000502032403253359160000105338153381533815338153381
8002453380400006180000479462516001016001080010343813004950300533805338043290270734335280010800201600205338078118002110910800101000000502042402353359160000105338153381533815338153381