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

Test 1: uops

Code:

  cmn x0, #3
  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
1004369203625100010001000500003693692063225100010001000369661110011000073118113661000370370370370370
1004369303625100010001000500003693692063225100010001000369661110011000073118113661000370370370370370
10043692013125100010001000500003693692063225100010001000369661110011000073118113661000370370370370370
1004369203625100010001000500003693692063225100010001000369661110011000073118113661000370370370370370
1004369303625100010001000500013693692063225100010001000369661110011000073118113661000370370370370370
1004369203625100010001000500003693692063225100010001000369661110011000073118113661000370370370370370
1004369203625100010001000500003693692063225100010001000369661110011000073118113661000370370370370370
1004369203625100010001000500003693692063225100010001000369661110011000073118113661000370370370370370
10043693123625100010001000500003693692063225100010001000369661110011000073118113661000370370370370370
1004369303625100010001000500003693692063225100010001000369661110011000073118113661000370370370370370

Test 2: Latency 2->1

Chain cycles: 1

Code:

  cmn x0, #3
  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)03mmu table walk data (08)181e1f3f4d51schedule 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
202042003515000006119930252010020100201121297233149169552003520035174256174872011220224202242003510411202011009910020100101000011113201349331998220000101002003620036200362003620036
2020420035150000053619930252010020100201121297233149169552003520035174256174872011220224202242003510411202011009910020100101000011113201349331998220000101002003620036200362003620036
202042003515000006119930252010020100201121297233149169552003520035174256174872011220224202242003510411202011009910020100101000011113180116112001120000101002003620036200362003620036
202042003515000006119930252010020100201121297233149169552003520035174256174872011220224202242003510411202011009910020100101000011113180116112001120000101002003620036200362003620036
202042003515000006119930252010020100201121297233049169552003520035174256174872011220224202242003510411202011009910020100101000011113180116112001120000101002003620036200362003620036
202042003515000006119930252010020100201121297233149169552003520035174346174872011220224202242003510411202011009910020100101000011113180116112001120000101002003620036200362003620036
202042003515000006119930252010020100201121297233149169552003520035174256174872011220224202242003510411202011009910020100101001011113180116112001120000101002003620036200362003620036
2020420035150000044119930252010020100201121297233149169552003520035174256174872011220224202242003510411202011009910020100101000011113180116112001120000101002003620036200362003620036
202042003515000006119930252010020100201121297233149169552003520035174256174872011220224202242003510411202011009910020100101000011113180116112001120000101002003620036200362003620036
202042003515000006119930252010020100201121297233049169552003520035174256174872011220224202242003510411202011009910020100101000011113180116112001120000101002003620174200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3f4d51schedule 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 mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200242003515006119918252001020010200101297247049169552003520035174283175042001020020200202003510411200211091020010100100001270427321999520000100102003620036200362003620036
200242003515006119918252001020010200101297247049169552003520035174283175042001020020200202003510411200211091020010100104001270327331999520000100102003620036200362003620036
200242003515006119918252001020010200101297247049169552003520035174283175042001020020200202003510411200211091020010100100001270627331999620000100102003620036200362003620036
200242003515006119918252001020010200101297247049169552003520035174283175042001020020200202003510411200211091020010100100001270327431999520000100102003620036200362003620036
200242003515006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270327431999520000100102003620036200362003620071
2002420035150061199182520010200102001012972470981695520035200351742831750420010200202002020035104112002110910200101001001501270327331999520000100102003620036200362003620036
20024200351501716119918252001020010200101297247049169552003520070174283175042001020020200202003510411200211091020010100100001270327231999520000100102003620036200362003620036
200242003515006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270327231999520000100102003620036200362003620036
200242003515006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270327331999520000100102003620036200362003620036
200242003515006119918252001020010200101297247149169552003520035174283175042001020020200202003510411200211091020010100100001270327331999520000100102003620036200362003620036

Test 3: throughput

Count: 8

Code:

  cmn x0, #3
  cmn x0, #3
  cmn x0, #3
  cmn x0, #3
  cmn x0, #3
  cmn x0, #3
  cmn x0, #3
  cmn x0, #3
  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)03181e1f3f51schedule 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)9fst unit uop (a7)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
802042676320000028278011580115801214005901492365926739267391667961668980121802328023226739661180201100991008010010000011151181160026736800151002674026740267402674026740
802042673920100028278011580115801214005901492365926739267391667961671180121802328023226739661180201100991008010010000311151180160026736800151002674026740267402674026740
802052673920000028278011580115801214005901492365926739267391667961668980121802328023226739661180201100991008010010000011151180160026736800151002674026740267402674026740
802042673920000028278011580115801214005901492365926739267391667961668980121802328023226739661180201100991008010010000011151180160026736800151002674026740267402674026740
802042673920000028278011580115801214005901492365926739267391667961668980121802328023226739661180201100991008010010000011151180160026736800151002674026740267402674026740
802042673920100082278011580115801214005901492365926739267391667961668980121802328023226739661180201100991008010010000011151180160026736800151002674026740267402674026740
802042673920000028278011580115801214005901492365926739267391667961668980121802328023226739661180201100991008010010000011151180160026736800151002674026740267402674026740
802042673920000070278011580115801214005901492365926739267391667961668980121802328023226739661180201100991008010010000011151180160026736800151002674026740267402674026740
802042673920000028278011580115801214005901492365926739267391667961668980121802328023226739661180201100991008010010000011151180160026736800151002674026740267402674026740
802042673920000028278011580115801214005901492365926739267391667961668980121802328023226739661180201100991008010010000011151180160026736800151002674026740267402674026740

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03181e3f51schedule 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)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800242671020000352580010800108001040005014923625267052670516665316683800108002080020267056611800211091080010100005020918692670180000102670626706267062670626706
800242670520000352580010800108001040005014923625267052670516665316683800108002080020267056611800211091080010100005020718962670180000102670626752267062670626706
800242670520000352580010800108001040005014923625267052670516665316683800108002080020267056611800211091080010100005020918792670180000102670626706267062670626706
800242670520000352580010800108001040005014923625267052670516665316683800108002080020267056611800211091080010100005020918792670180000102670626706267062670626706
800242670520000352580010800108001040005014923625267052670516665316683800108002080020267056611800211091080010100005020918692670180000102670626706267062670626706
800242670520000352580010800108001040005014923625267052670516665316683800108002080020267056611800211091080010100005020718692670180000102670626706267062670626706
800242670520000352580010800108001040005014923625267052670516665316683800108002080020267056611800211091080010100005020918692670180000102670626706267062670626706
800242670520000352580010800108001040005014923625267052670516665316683800108002080020267056611800211091080010100005020918962670180000102670626706267062670626706
800242670520000352580010800108001040005014923625267052670516665316683800108002080020267056611800211091080010100005020918792670180000102670626706267062670626706
800242670520000352580010800108001040005014923625267052670516665316683800108002080020267056611800211091080010100005020918692670180000102670626706267062670626706