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

Test 1: uops

Code:

  cmp w0, w1, uxth
  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)033f4c4d5051schedule 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
100470956110003040252000200010004087717097094982135611000100020007097811100110000073222226842000710710710710710
10047095611000304693252000200010004087717097094982135611000100020007097811100110000073222226842000710710710710710
100470966110003040252000200010004087717097094982535611000100020007097811100110000073222226842000710710710710710
100470966110003040252000200010004087717097094982135611000100020007097811100110000073222226842000710710710710710
100470958210003040252000200010004087717097094982535611000100020007097811100110000073222226842000710710710710710
100470956110003040252000200010004087717097094982135611000100020007097811100110000073222226842000710710710710710
100470958210003040252000200010004087717097094982135611000100020007097811100110000073222226842000710710710710710
100470956110003040252000200010004087717097094982535611000100020007097811100110000073222226842000710710710710710
100470956110003040252000200010004087717097094982535611000100020007097811100110000073222226842000710710710710710
100470957110003040252000200010004087717097094982135611000100020007097811100110000073222226842000710710710710710

Test 2: Latency 3->1

Chain cycles: 1

Code:

  cmp w0, w1, uxth
  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)031e3f4c4d51schedule 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)cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2020430070225061100002989325301003010020100195619814926955300353003527369327478201002020030200300351451120201100991002010010100000013101231232995430000101003003630036300363003630036
2020430035225061100002989325301003010020100195619814926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
2020430035224061100002989325301003010020100195619814926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
2020430035225061100002989325301003010020100195619804926955300353003527369327478201002020030200300351451120201100991002010010100000013101231223000130000101003003630036300363003630036
20204300352240611000029893253010030100201001956198049269553003530035273691127478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
2020430035225061100002989325301003010020100195619814926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
2020430035225061100002989325301003010020100195619814926955300353003527403327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
2020430035225061100002989325301003010020100195619814926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036
2020430035225061100002989325301003010020100195619814926955300353003527369327478201002020030200300351451120201100991002010010100200013101231222995430000101003003630036300363003630036
2020430035225061100002989325301003010020100195619814926955300353003527369327478201002020030200300351451120201100991002010010100000013101231222995430000101003003630036300363003630036

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 access (a0)l1d tlb miss (a1)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024300352250027310000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
20024300352250075810000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630069300363003630036
20024300352250050710000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
2002430035225096110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
2002430035225006110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000001270133212995830000100103003630036300363003630036
2002430079225006110000298912530010300102001019562890492695530035300352739132749820010200203002030080145112002110910200101001000001270133112995830000100103003630036300363003630036
2002430035225006110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
2002430035225006110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000001270133112995830000100103003630036300363003630036
20024300352250046610000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001000001270133122995830000100103003630036300363003630036
20024300352250014910000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001000001270133112996930000100103003630036300363003630036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  cmp w0, w1, uxth
  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)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 access (a0)ld unit uop (a6)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202043003522500611000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000000013101231222995430000101003003630036300363003630036
202043003522500611000029893253010030100201001956198149269553003530035273693274782010020200302003003514511202011009910020100101000000113101231322995430000101003003630036300363003630036
202043003522500841000029893253010030100201001956198149269553003530035273693274782010020200302003003514511202021009910020100101000003013101331322995430000101003003630036300363003630036
202043003522500611000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000000013101331332995430000101003003630036300363003630036
202043003522500611000029893253010030100201001956198149269553003530035273693274782010020200302003003514511202011009910020100101000006013101331232995430000101003003630036300363003630036
2020430035225006110000298932530100301002010019561981492695530035300352736932747820100202003020030035145112020110099100201001010000163013101231222995430000101003003630036300363003630036
202043003522500611000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000003013101231222995430000101003003630036300363003630036
202043003522400611000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000003013101331332995430000101003003630036300363003630036
202043003522500611000029893253010030100201001956198049269553003530035273693274782010020200302003003514511202011009910020100101000003013101231232995430000101003003630036300363003630036
2020430035225006110000298932530100301002010019561980492695530035300352736932747820100202003020030035145112020110099100201001010000012013101331322995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)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 cache writeback (a8)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024300352250015210000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001001270133112995830000100103003630036300363003630036
2002430035225006110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001001270333112995830000100103003630036300363003630036
2002430035225006110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001001270133112995830000100103003630036300363003630036
20024300352240017010000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001001270133112995830000100103003630036300363003630036
2002430035224006110000298912530010300102001019562891492695530035300352739132749820012200203002030035145112002110910200101001001270133112995830002100103003630036300363003630036
2002430035225006110000298912530010300102001019562891492695530035300352739132749820010200203002030035156112002110910200101001001270133112995830000100103003630036300363003630036
2002430035225106110000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001001270133112995830000100103003630036300363003630036
2002430035225008210000298912530010300102001019562891492695530035300352739132749820010200203002030035145112002110910200101001001270133112995830000100103003630036300363003630036
20024300352250044810000298912530010300102001019562891492704530035300352739132749820010200203002030035145112002110910200101001001270133112995830000100103003630036300363003630036
2002430035224006110000298912530010300102001019562890492695530035300352739132749820010200203002030035145112002110910200101001001270133112995830000100103003630036300363003630036

Test 4: throughput

Count: 8

Code:

  cmp w0, w1, uxth
  cmp w0, w1, uxth
  cmp w0, w1, uxth
  cmp w0, w1, uxth
  cmp w0, w1, uxth
  cmp w0, w1, uxth
  cmp w0, w1, uxth
  cmp w0, w1, uxth
  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)031e1f3f4c4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)696a6d6emap 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)acbranch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80204534574000061800004874125160100160100801003440005495033053410534104329820633433608010080200160200534107811802011009910080100100000480511022411533921600001005341153411534115341153411
802045341040000618000048741251601001601008010034400054950330534105341043298206334336080100802001602005341078118020110099100801001000001620511012411533921600001005341153411534115341153411
8020453410400006180000487412516010016010080100344000549503305341053410432982050343360801008020016020053410781180201100991008010010000330511012411533921600001005341153411534115341153411
802045341040000618000048741251601001601008010034400054950330534105341043298205034336080100802001602005341078118020110099100801001000001710511012411533921600001005341153411534115341153411
802045341040000618000048741251601001601008010034400054950330534105341043298206334336080100802001602005341078118020110099100801001000001470511012421533921600001005341153411534115341153411
802045346540100618000048741381601001601008010034400054950330534105341043298206334336080100802001602005341078118020110099100801001000011260511012411533921600001005341153411534115341153411
802045341040030618000048741251601001601008010034400054950330534105341043298205034336080100802001602005341078118020110099100801001000001020511012411533921600001005341153411534115341153411
8020453410400006180000487412516010016010080100344000549503305341053410432982063343360801008020016020053410781180201100991008010010000031511012411533921600001005341153411534115341153411
80204534104000061800004874125160100160100801003440005495033053410534104329820603433608010080200160200534107811802011009910080100100000720511012411533921600001005341153411534115341153411
80204534104000061800004874125160100160100801003440005495033053410534104329820633433608010080200160200534107811802011009910080100100000600511012411533921600001005341153411534115341153411

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l2 tlb miss data (0b)191e1f3a3f4c4d51schedule 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 cache writeback (a8)accfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dbddfetch restart (de)e0? int output thing (e9)eaeb? int retires (ef)f5f6f7f8fd
80024533833990000018780000479462516001016001080010343813004950300533805338043290256234335280010800201600205338078118002110910800101000502000052400565335916000000105338153381533815338153381
8002453380400006006180000479462516001016001080010343813014950300533805338043290270734335280010800201600205338078118002110910800101000502000082400665335916000000105338153381533815338153381
8002453380399000006180000479462516001016001080010343813014950300533805338043290270734335280010800201600205338078118002110910800101000502000062400665335916000000105338153381533815338153381
800245338039900000147800004794625160010160010800103438130049503005338053380432902707343352800108023916002053380781180021109108001010590502000062400775335916000000105338153381533815338153381
80024533803990000072680000479462516001016001080010343813014950300533805338043290256234335280010800201600205338078118002110910800101000502000072400765335916000000105338153381533815338153381
8002453380400000006180000479462516001016001080010343813014950300533805338043290256234335280010800201600205338078118002110910800101000502000072400665335916000000105338153381533815338153420
80024533804000000072680000479462516001016001080010343813004950300533805338043290256234335280010800201600205338078118002110910800101000502000052400665335916000000105338153381533815338153381
8002453380400000006180000479462516001016013680010343813014950300533805338043290270734335280010800201600205338078118002110910800101000502000052400565335916000000105338153381533815338153381
80024533804000000012480000479462516001016001080010343813004950300533805338043290270734335280110800201600205338078118002110910800101000502000062400655335916000000105338153381533815338153381
8002453380400000006180000479462516001016001080010343813014950300533805338043290270734335280010800201600205338078118002110910800101000502000082400675335916000000105338153381533815338153381