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

Test 1: uops

Code:

  cmn x0, #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)606d6emap 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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
1004369203625100010001000500013693692063225100010001000369661110011000073118113661000370370370370370
1004369303625100010001000500013693692063225100010001000369661110011000073118113661000370370370370370
1004369303625100010001000500003693692063225100010001000369661110011000073118113661000370370370370370
1004369303625100010001000500013693692063225100010001000369661110011000073118113661000370370370370370
1004369303625100010001000500003693692063225100010001000369661110011000073118113661000370370370370370
1004369303625100010001000500003693692063225100010001000369661110011000073118113661000370370370370370
1004369303625100010001000500013693692063225100010001000369661110011000073118113661000370370370370370
1004369203625100010001000500013693692063225100010001000369661110011000073118113661000370370370370370
1004369203625100010001000500003693692063225100010001000369661110011000073118113661000370370370370370
1004369303625100010001000500013693692063225100010001000369661110011000073118113661000370370370370370

Test 2: Latency 2->1

Chain cycles: 1

Code:

  cmn x0, #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)031e1f3a3f4d51schedule 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)9fld unit uop (a6)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20204200351500006119930252010020100201121297233049169552003520035174256174872011220224202242003510411202011009910020100101000001111320116112001120000101002003620036200362003620036
202042003515000012619930252010020100201121297233149169552003520035174256174872011220224202242003510411202011009910020100101000001111318116112001120000101002003620036200362003620036
20204200351500006119930252010020100201121297233149169552003520035174256174872011220224202242003510411202011009910020100101000001111318116112001120000101002003620036200362003620036
20204200351500006119930252010020144201121297233149169552003520035174256174872011220224202242003510411202011009910020100101000001111318316112001120000101002003620036200362003620036
20204200351500006119930252010020100201121297857149169552003520035174256174872011220224202242003510411202011009910020100101000001111318116112001120000101002003620036200362003620036
20204200351500006119930252010020100201121297233149169552003520035174256174872011220224202242003510411202011009910020100101000001111318116112001120000101002003620036200362003620036
20204200351500006119930252010020100201121297233049169552003520035174256174872011220224202242003510411202011009910020100101000001111318116112001120000101002003620036200362003620036
20204200351500006119930252012220100201121297233049169552003520035174256174872011220224202242003510411202011009910020100101000001111318116112001120000101002003620036200362003620036
20204200351500006119930252010020100201121297233049169552003520035174256174872011220224202242003510411202011009910020100101000001111318216112001120000101002003620036200362003620036
20204200351500006119930252010020100201121297233049169552003520035174256174872011220224202242003510411202011009910020100101000001111318116112001120000101002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e1f3f4d51schedule 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 cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270227111999520000100102003620036200362003620069
20024200351500074719918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270127111999520000100102003620036200362003620036
2002420035149006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270127121999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270127111999520000100102003620036200362003620036
2002420035149006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270127111999520000100102003620036200362003620036

Test 3: throughput

Count: 8

Code:

  cmn x0, #3, lsl #12
  cmn x0, #3, lsl #12
  cmn x0, #3, lsl #12
  cmn x0, #3, lsl #12
  cmn x0, #3, lsl #12
  cmn x0, #3, lsl #12
  cmn x0, #3, lsl #12
  cmn x0, #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)030918191e3f51schedule 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)ld unit uop (a6)l1d cache writeback (a8)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020426761200000028278011580115801214005900492365926739267391667906166898012180232802322673966118020110099100801001000002011151180160026736800151002674026740267402674026740
8020426739200000070278011580115802564005901492365926739267391667906166898012180232803032673966118020110099100801001000000011151180160026736800151002674026740267402674026740
8020426739200000028278011580115801214005900492365926739267391667906167378012180230802302675166118020110099100801001000000022251281251126748800151002675226751267512675126751
8020426750201000064338011580115801214005900492367026751267501667609166868012180230802302675066118020110099100801001000000022251291251126747800151002675126751267512675126751
80204267502010000643480115801158012140059004923670267502675016676010166868012180230802302675066118020110099100801001000220022251291251126748800151002675126751267522675126752
8020426750200100064338011580115801214005900492367026750267511667609166868012180230802302675066118020110099100801001000000022251291251126747800151002675126751267512675126751
80204267502000000643480115801158012140059014923671267502675016676010166868012180230802302675066118020110099100801001000000022251281251126747800151002675226751267512675226751
8020426750200000064338011580115801214005900492367126750267511667609166868012180230802302675066118020110099100801001000000022251281251126805800151002675126752267512675126751
8020426751201000064348011580115803184005900492367026750267501667609166868012180230802302675066118020110099100801001000010322251281251126748800151002675126751267512675126751
802042675120000007293380115801158012140059004923670267962675116676010166868012180230802302675166118020110099100801001000000322251281251126748800151002675126752267522675126751

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)091e1f3f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)5f6061696a6d6emap 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)acbranch mispred nonspec (cb)cfd0d2d5map dispatch bubble (d6)dadbddfetch restart (de)e0? int output thing (e9)ea? int retires (ef)f5f6f7f8fd
8002426722200000055258001080010800104000500104923625267052670516665316683800108002080020267056651800211091080010100001502009318006526701800000102670626762267502670626706
8002426705200000035258001080010800104000500104923625267052670516665316683800108002080020267056611800211091080010100000502008718003326701800000102670626706267062670626706
8002426705200000035258001080010800104000500104923625267052670516665316683800108002080020267056611800211091080010100000502008418002326701800000102670626706267062670626706
80024267052000000582580010800108001040005001049236252670526705166653166838001080020800202670566118002110910800101000005020011818005326701800000102670626706267062670626706
80024267052000000352580010800108001040005001049236252670526705166653166838001080020800202670566118002110910800101000005020013318006326701800000102670626706267062670626706
80024267052000000352580010800108001040005001049236252670526705166653166838001080020800202670566118002110910800101000005020011318013326701800000102670626706267062670626706
80024267052000000352580010800108001040005001049236252670526705166653166838001080020800202670566118002110910800101000005020011818003626701800000102670626706267062670626706
80024267052000000352580010800108001040005001049236252670526705166653166838001080020800202670566118002110910800101000005020011418003626701800000102670626706267062670626706
80024267052000000352580010800108001040005001049236252670526705166653166838001080020800202670566118002110910800101000005020011318002326701800000102670626706267062670626706
800242670520000003525800108001080010400050010492362526705267051666531668380010800208002026705661180021109108001010031005020011318006526701800000102670626706267062670626706