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

Test 1: uops

Code:

  cmn w0, #3, lsl #12
  mov x0, 1

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 1.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 0.000

retire uop (01)cycle (02)031e3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)6d6emap 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 int alu (97)l1d tlb access (a0)ld unit uop (a6)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
1004369303625100010001000500036936920632251000100010003696611100110000073318113661000370370370370370
1004369303625100010001000500036936920632251000100010003696611100110000073118113661000370370370370370
1004369203625100010001000500036936920632251000100010003696611100110000073118113661000370370370370370
1004369303625100010001000500036936920632251000100010003696611100110002073118113661000370370370370370
1004369303625100010001000500036936920632251000100010003696611100110000073118113661000370370370370370
1004369303625100010001000500036936920632251000100010003696611100110000073118113661000370370370370370
1004369203625100010001000500036936920632251000100010003696611100110000073118113661000370370370370370
1004369303625100010001000500036936920632251000100010003696611100110000073118113661000370370370370370
1004369203625100010001000500036936920632251000100010003696611100110000073118113661000370370370370370
1004369203625100010001000500036936920632251000100010003696611100110000073118113661000370370370370370

Test 2: Latency 2->1

Chain cycles: 1

Code:

  cmn w0, #3, lsl #12
  cset x0, cc
  mov x0, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)0309l2 tlb miss data (0b)1e3a3f4d51schedule 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)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
20204200351500000611993025201002010020112129723349169552003520035174256174872011220224202242003510411202011009910020100101000011113180116212001120000101002003620036200362003620036
202042003515000011011989925201002010020100129693149169552003520035173806174562010020200202002003510411202011009910020100101000011113201449441998220000101002003620036200362003620036
20204200351500001611993025201002010020112129723349169552003520035174256174872011220224202242003510411202011009910020100101002011113180216212001120000101002003620036200362003620036
20204200351500060611993025201002010020112129723349169552003520035174256174872011220224202242003510411202011009910020100101000011113180216212001120000101002003620036200362003620036
20204200351500000611993025201002010020112129723349169552003520035174256174872011220224202242003510411202011009910020100101000011113180116112001120000101002003620036200362003620036
20204200351500000611993025201002010020112129723349169552003520035174256174872011220224202242003510411202011009910020100101000311113180216212001120000101002003620036200362003620036
202042003515000006119930252010020100201121297233491695520035200351742561748720112202242022420035104112020110099100201001010002711113180116122001120000101002003620036200362003620036
20204200351501000611993025201002010020112129723349169552003520035174256174872011220224202242003510411202011009910020100101000011113180216212001120000101002003620036200362003620036
20204200351500000611993025201002010020112129723349169552003520035174256174872019020224202242003510411202011009910020100101000011113180116112001120000101002003620036200362003620036
20204200351500000611993025201002010020112129723349169552003520035174256174872011220224202242003510411202011009910020100101000011113180116112001120000101002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)1e3f4d51schedule 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)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100011270227221999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270227321999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270227221999520000100102003620036200362003620036
20024200351500063119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270327221999520000100102003620036200362003620036
2002420035149006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100102001270227331999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270227221999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247049169552003520035174283175042001020020200202003510411200211091020010100100001270227221999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270227221999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247049169552003520035174283175042001020020200202003510411200211091020010100100001270227231999520000100102003620036200362003620036
20024200351500025119918252001020010200101297247049169552003520035174283175042001020020200202003510411200211091020010100100001270227221999520000100102003620036200362003620036

Test 3: throughput

Count: 8

Code:

  cmn w0, #3, lsl #12
  cmn w0, #3, lsl #12
  cmn w0, #3, lsl #12
  cmn w0, #3, lsl #12
  cmn w0, #3, lsl #12
  cmn w0, #3, lsl #12
  cmn w0, #3, lsl #12
  cmn w0, #3, lsl #12
  mov x0, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)031e3a3f51schedule 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)cdcfmap dispatch bubble (d6)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80204267392000030527801158011580121400590149236592673926739166796166898012180232802322673966118020110099100801001000011151181626736800151002674026740267402674026740
8020426739200009127801158011580121400590149236592673926739166796166898012180232802322673966118020110099100801001000011151181626736800151002674026740267402674026740
8020426739201009127801158011580121400590149236592673926739166796166898012180232802322673966118020110099100801001000011151181626736800151002674026740267402674026740
80204267392000013327801158011580121400590149236592673926739166796166898012180232802322673966118020110099100801001000011151181626736800151002674026740267402674026740
80204267392000013327801158011580121400590149236592673926739166796166898012180232802322673966118020110099100801001001611151181626736800151002674026740267402674026740
8020426739200009127801158011580121400590149236592673926739166796166898012180232802322673966118020110099100801001000011151181626770800151002674026740267402674026740
80204267392010013727801158011580121400590149236592673926739166796166898012180232802322673966118020110099100801001000011151181626736800151002674026740267402674026740
80204267392000015427801158011580121400590149236592673926739166796166898012180232802322673966118020110099100801001000011151181626736800151002674026740267402674026740
80204267392000011227801158011580121400590049236592673926739166796166898012180232802322673966118020110099100801001000011151181626736800151002674026740267402674026740
80204267392000013327801158011580121400590049236592673926739166796166898012180232802322673966118020110099100801001000011151181626736800151002674026740267402674026740

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)09l2 tlb miss data (0b)1e3f51schedule 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)ld unit uop (a6)l1d cache writeback (a8)accdcfd2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8002426710200000035258001080010800104000501492362526705267051666531668380010800208002026705661180021109108001010000000502091218692670180000102670626706267062670626706
800242670520000033525800108001080010400050149236252670526705166653166838001080020800202670566118002110910800101000000050208111811112670180000102670626706267062670626706
8002426705200000035258001080010800104000500492362526705267051666531668380010800208002026705661180021109108001010000000502089181062670180000102670626706267062670626706
80024267052000000352580010800108001040005004923625267052670516665316683800108002080020267056611800211091080010100000005020810181092670180000102670626706267062670626706
80024267052000000352580010800108001040005014923625267052670516665316683800108002080020267056611800211091080010100100005020101018572670180000102670626706267062670626706
80024267052000000352580010800108001040005014923625267052670516665316683800108002080020267056611800211091080010100000005020910181092670180060102670626706267062670626706
800242670520000003525800108001080010400050149236252670526705166653166838001080020800202670566118002110910800101000000050207718872670180000102670626706267062670626706
800242670520000003525800108001080010400050049236252670526705166653166838001080020800202670566118002110910800101000000050208918882670180000102670626706267062670626706
800242670520000003525800108001080010400050149236252670526705166653166838001080020800202670566118002110910800101000000050208518862670180000102670626706267062670626706
800242670520000003525800108001080010400050049236252670526705166653166838001080020800202670566118002110910800101000000050208718772670180000102670626706267062670626706