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

Test 1: uops

Code:

  cmp w0, w1, uxtb
  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)l1d tlb miss (a1)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
100470956110003042520002000100040877070970949825356110001000200070978111001100000073122116842000710710710710710
100470956110003042520002000100040877070970949821356110001000200070978111001100000073122116842000710710710710710
100470956110003042520002000100040877070970949825356110001000200070978111001100000073122116842000710710710710710
100470956110003042520002000100040877070970949821356110001000200070978111001100001073122116842000710710710710710
100470956110003042520002000100040877170970949825356110001000200070978111001100000073122116842000710710710710710
100470956110003042520002000100040877070970949821356110001000200070978111001100000073122116842000710710710710710
100470966110003042520002000100040877176370949821356110001000200070978111001100000073122116842000710710710710710
100470956110003042520002000100040877170970949821356110001000200070978111001100000073122116842000710710710710710
100470956110003042520002000100040877070970949825356110001000200070978111001100000073122116842000710710710710710
100470956110003042520002000100040877070970949821356110001000200070978111001100000073122116842000710710710710710

Test 2: Latency 3->1

Chain cycles: 1

Code:

  cmp w0, w1, uxtb
  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)03090f191e1f3f4c4d51schedule 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 cache writeback (a8)accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20204300352240009061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
20204300352250000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
20204300352250000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231232995430000101003003630036300363003630036
20204300352250000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
20204300352250000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101343222995430000101003003630036300363003630036
20204300352250000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
20204300352250000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
20204300352240000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
20204300352250000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013101231222995430000101003003630036300363003630036
20204300352250000061100002989325301003010020100195619849269553003530035273693274782010020200302003003514511202011009910020100101000013291231222995430000101003003630036300363003630036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03191e3f4c4d51schedule 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)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024300352250061100002989125300103001020010195628949269550300353003527391327498200102002030020300351451120021109102001010010001270133122995830000100103003630036300363003630066
20024300352250061100002989125300103001020010195628949269550300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
200243003522400120100002989125300103001020010195628949269550300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
200243003522400156100002989125300103001020010195628949269550300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
20024300352250061100002989132300103001020010195628949269550300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
20024300352250061100002989125300103001020010195628949269550300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
20024300352250061100002989125300103001020010195628949269553300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
200243003522500611000029891253001030010200101956289492695503003530035273913274982001020020300203003514511200211091020010100100181270133112995830022100103003630036300363003630036
20024300352250061100002989125300103001020010195628949269550300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036
20024300352250061100002989125300103001020010195628949269550300353003527391327498200102002030020300351451120021109102001010010001270133112995830000100103003630036300363003630036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  cmp w0, w1, uxtb
  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)l2 tlb miss data (0b)191e3f4c4d51schedule 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)cdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202043003522400024611000029899253010030100201071956240149269553003530035274006274872010720224302363003514511202011009910020100101000011113180116112998130000101003003630036300363003630036
20204300352250000611000029899253010030100201071956240149269553003530035273916274872010720224302363003514511202011009910020100101000011113180116112998130000101003003630036300363003630036
20204300352250000611000029893253010030100201001956198149269553003530035273693274782010020200302003003514511202011009910020100101000000013101231222995430000101003003630036300363003630036
20204300352250000611000029893253010030100201001956198149269553003530035273693274782010020200302003003514511202011009910020100101000000013101231222995430000101003003630036300363003630036
20204300352250000611000029893253010030100201001956198149269553003530035273693274782010020200302003003514511202011009910020100101000000013101231222995430000101003003630036300363003630036
20204300352250000611000029893253010030100201001956198149269553003530035273693274782010020200302003003514511202011009910020100101000000013101231222995430000101003003630036300363003630036
202043003522500021611000029893253010030100201001956198149269553003530035273693274782010020200302003003514511202011009910020100101000000013101231222995430000101003003630036300363003630036
20204300352250000611000029893253010030100201001956198149269553003530035273693274782010020200302003003514511202011009910020100101000000013101231322995430000101003003630036300363003630036
20204300352240000611000029893253010030100201001956198149269553003530035273693274782010020200302003003514511202011009910020100101000000013101231222995430000101003006830036300363003630036
20204300352250000611000029893253010030100201001956198149269553003530035273693274782010020200302003003514511202011009910020100101000000013101231222995430000101003003630036300363003630036

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)18191e1f3f4c4d51schedule 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)9fl1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200243003522500000611000029891253001030010200101956289492695503003530035273913274982001020020300203003514511200211091020010100100000001270133322995830000100103003630036300363003630036
2002430035225000001451000029891253001030010200101956289492695503003530035273913274982001020020300203003514511200211091020010100100000001270133112995830000100103003630036300363003630036
200243003522500000611000029891253001030010200101956289492695503003530035273913274982001020020300203003514511200211091020010100100000001270133112995830000100103003630036300363003630036
200243003522500000611000029891253001030010200101956289492695503003530035273913274982001020020300203003514511200211091020010100100000001270133122995830000100103003630036300363003630036
2002430035225000120611000029891253001030010200101956289492695503003530035273913274982001020020300203003514511200211091020010100100000001270133232995830023100103003630036300363003630036
200243003522500000611000029891253001030010200101956289492695503003530035273913274982001020020300203003514511200211091020010100100000001270133122995830000100103003630036300363003630036
200243003522500000611000029891253001030010200101956289492695533003530035273913274982001020020300203003514511200211091020010100100000001270133322995830000100103003630036300363003630036
200243003522500000611000029891253001030010200101956289492695503003530035273913274982001020020300203003514511200211091020010100100000001270133112995830000100103003630036300363003630036
200243003522500000611000029891253001030010200101956289492695503003530035273913274982001020020300203003514511200211091020010100100000001270133322995830000100103003630036300363003630036
200243003522500000611000029891253001030010200101956289492695503003530035273913274982001020020300203003514511200211091020010100100000001270133222995830000100103003630036300363003630036

Test 4: throughput

Count: 8

Code:

  cmp w0, w1, uxtb
  cmp w0, w1, uxtb
  cmp w0, w1, uxtb
  cmp w0, w1, uxtb
  cmp w0, w1, uxtb
  cmp w0, w1, uxtb
  cmp w0, w1, uxtb
  cmp w0, w1, uxtb
  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)1e3a3f4c4d51schedule 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)9fld unit uop (a6)l1d cache writeback (a8)acc2cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802045345540100266800004874125160100160100801003440005049503305341053410432982063343360801008020016020053410781180201100991008010010000000511482499533921600001005341153411534115341153411
802045341040000266800004874125160100160100801003440005049473065362453410432982063343360801008020016020053410781180201100991008010010000900511492499533921600001005341153411534115341153411
802045341040000266800004874125160100160100801003440005049503305341053410432982063343360801008020016020053410781180201100991008010010000000511442494533921600001005341153411534115341153411
802045341040000266800004874125160100160100801003440005049503305341053410432982050343360801008020016020053410781180201100991008010010000000511492499533921600001005341153411534115341153411
802045341040000266800004874125160100160100801003440005049503305341053410432982050343360801008020016020053410781180201100991008010010000000511492499533921600001005341153411534115341153411
802045341040000266800004874125160100160100801003440005049503305341053410432982060343360801008020016020053410782180201100991008010010000000511492494533921600001005341153411534115341153411
802045341040000266800004874125160100160100801003440005049503305341053628432982050343360801008020016020053410781180201100991008010010000000511492499533921600001005341153411534115341153411
802045341040000266800004874125160100160100801003440005049503305341053410432982063343360801008020016020053410781180201100991008010010000000511492499533921600001005341153411534115341153411
802045341040000266800004874125160100160100801003440005049503305341053410432982050343360801008020016020053410781180201100991008010010000000511492499533921600001005341153411534115341153411
802045341040000266800004874125160100160100801003440005049503305341053410432982063343385801008020016020053410781180201100991008010010000600511492499533921600001005341153411534115341153411

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)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)191e3a3f4c4d51schedule 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)acbranch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)eaeb? int retires (ef)f5f6f7f8fd
80024534024001010002688000047946251600101600108001034381301495030053380533804329025623433528031480020160020533807811800211091080010100000005024202416175335916000000105338153381533815338153381
80024533803991010002688000047946251600101600108001034381301495030053380533804329025623433528001080020160020533807811800211091080010100000005024162416165335916000000105338153381533815338153381
80024534304021111002688000047946251600101600108001034381301495030053380533804329025623433528001080020160020533807811800211091080010100000005024142415155335916000000105338153381533815338153381
80024533804001010070226388000047946251600101600108001034381301495030053380533804329025623433528001080020160020533807811800211091080010100000005024162414165335916000000105338153381533815338153381
80024533803991010002688000047946251600101600108001034381301495030053380533804329025623433528001080020160020533807811800211091080010100000005024162414145335916000000105338153381533815338153381
80024533804001010002688000047946341600101600108001034381301495030053380533804329025623433528042080020160020533807811800211091080010100000005024162415165335916000000105338153381533815338153381
8002453380399101004832688000047946251600101600108001034381300495030053380533804329025623433528001080020160020533807811800211091080010100000005024142416145335916000000105338153381533815338153381
80024533803991010002688000047946251600101600108001034381301495030053380533804329027073433528001080020160020533807811800211091080010100000005024162416155335916000000105338153381533815338153381
80024533803991010002688000047946251600101600108001034381301495030053380533804329027073433528001080020160020533807811800211091080010100000005024162417165335916000000105338153381533815338153490
800245338039910100021738000047946251600101600108001034381301495030053380533804329027073433528001080020160020533807811800211091080010100000005024162416155335916000000105338153381533815338153381