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

Test 1: uops

Code:

  cmn x0, x1
  mov x0, 1
  mov x1, 2

(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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
100436930362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370
100436930362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370
100436930362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370
100436930362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370
100436930362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370
100436920362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370
100436930362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370
100436920362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370
100436930362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370
100436930362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370

Test 2: Latency 3->1

Chain cycles: 1

Code:

  cmn x0, x1
  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): 1.0035

retire uop (01)cycle (02)031e3a3f4d51schedule 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)accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20204200351500061199261062010020100201001297150149169552003520035174063174812010020200302002003510411202011009910020100101000013101228221999220000101002003620036200362003620036
2020420035150006119926252010020100201001297150049169552003520035174063174812010020200302002003510411202011009910020100101000013101228221999220000101002003620036200362003620036
2020420035150006119926252010020100201001297150049169552003520035174063174812010020200302002003510411202011009910020100101000013101228221999220000101002003620036200362003620036
2020420035150006119926252010020100201001297150149169552003520035174063174812010020200302002003510411202011009910020100101001013101228221999220000101002003620036200362003620036
2020420066150006119926252010020100201001297150049169552003520035174063174812010020200302002003510411202011009910020100101000013101228221999220000101002003620036200362003620036
2020420035150006119926252010020100201001297150049169552003520035174063174812010020200302002003510411202011009910020100101001013101228221999220000101002003620036200362003620036
2020420035150006119926252010020100201001297150149169552003520035174063174812010020200302002003510411202011009910020100101000013101228221999220000101002003620036200362003620036
2020420035150006119926252010020100201001297150049169552003520035174063174812010020200302002003510411202011009910020100101000013101228221999220000101002003620036200362003620036
2020420035150006119926252010020100201001297150149169552003520035174063174812010020200302002003510411202011009910020100101000013101228221999220000101002003620036200362003620036
2020420035150006119926252010020100201001297150149169552003520035174063174812010020200302002003510411202011009910020100101000013101228221999220000101002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03181e3f4d51schedule 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)9faccfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024200351500061199182520010200102001012972471491695520035200351742831750420010200203002020035104112002110910200101001001270327341999520000100102003620036200362003620036
20024200351500061199182520010200102001012972471491695520035200351742831750420010200203002020035104112002110910200101001001270327321999520000100102003620036200362003620036
20024200351500061199182520010200102001012972471491695520035200351742831750420010200203002020035104112002110910200101001001270327231999520000100102003620036200362003620036
200242003515000145199182520010200102001012972471491695520035200351742831750420010200203002020035104112002110910200101001001270327341999520000100102003620036200362003620036
20024200351500961199182520010200102001012972471491695520035200351743931750420010200203002020035104112002110910200101001001270327331999520000100102003620036200362003620036
20024200351500061199182520010200102001012972471491695520035200351742831750420010200203002020035104112002110910200101001001270327341999520000100102003620036200362003620036
20024200351500061199182520010200102001012972471491695520035200351742831750420010200203002020035104112002110910200101001001270327331999520000100102003620036200362003620036
20024200351490061199182520010200102001012972471491695520035200351742831750420010200203002020035104112002110910200101001001270327341999520000100102003620036200362003620036
20024200351490061199182520010200102001012972471491695520035200351742831750420010200203002020035104112002110910200101001001270327341999520000100102003620036200362003620036
20024200351500061199182520010200102001012972471491695520035200351742831750420010200203002020035104112002110910200101001001270327431999520000100102003620036200362003620036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  cmn x0, x1
  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): 1.0035

retire uop (01)cycle (02)03181e1f3f4d51schedule 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)9fcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202042003515000061199262520100201002010012971501491695520035200351740631748120100202003020020035104112020110099100201001010013101228221999220000101002003620036200362003620036
202042003515000061199262520100201002010012971501491695520035200351740631748120100202003020020035104112020110099100201001010013291328321999220000101002003620036200362003620036
202042003515000082199262520100201002010012971501491695520035200351740631748120100202003020020035104112020110099100201001010013101228221999220000101002003620036200362003620036
202042003515000061199262520100201002010012971500491695520035200351740631748120100202003020020035104112020110099100201001010013101228221999220000101002003620036200362003620036
202042003515000061199262520100201002010012971501491695520035200351740631748120100202003020020035104112020110099100201001010013101228221999220000101002003620036200362003620036
2020420035150000145199262520100201002010012971500491695520035200351740631748120100202003020020035104112020110099100201001010013101228221999220000101002003620036200362003620036
202042003515000061199262520100201002010012971501491695520035200351740631748120100202003020020035104112020110099100201001010013101228231999220000101002003620036200362003620036
202042003515000061199262520100201002010012971500491695520035200351740631748120100202003020020035104112020110099100201001010013101228221999220000101002003620036200362003620036
202042003515000061199262520100201002010012971500491695520035200351740631748120100202003020020035104112020110099100201001010013101228221999220000101002003620036200362003620036
202042003515000061199262520100201002010012971500491695520035200351740631748120100202003020020035104112020110099100201001010013101228221999220000101002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)0318191e3f4d51schedule 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)accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024200351500063611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010020301270227111999520000100102003620036200362003620036
2002420035150000611991825200102001020010129724714916955200352003517428317504200102002030194200351041120021109102001010010000001270127111999520000100102003620036200362003620036
2002420035150000611991825200102001020010129724714916955200352003517428317527200102002030020200351041120021109102001010010000001270127111999520000100102003620036200362003620036
20024200351500033611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010000001270127111999520000100102003620036200362003620036
2002420035150000611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010000001270127111999520000100102003620036200362003620036
20024200351500024611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010000001270127111999520000100102003620036200362003620036
2002420035150000611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010001001270227111999520000100102003620036200362003620036
2002420067150000611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010000001270127111999520000100102003620036200362003620036
2002420035150000611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010000001270127111999520000100102003620036200362003620036
2002420035150000611991825200102001020010129724714916955200352003517428317504200102002030020200351041120021109102001010010000001270127111999520000100102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  cmn x0, x1
  cmn x0, x1
  cmn x0, x1
  cmn x0, x1
  cmn x0, x1
  cmn x0, x1
  cmn x0, x1
  cmn x0, x1
  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.3342

retire uop (01)cycle (02)0318191e3f51schedule 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
80204267352000042352580100801008010040050004923655267352673516672316690801008020016020026735661180201100991008010010000051103192226731800001002673626736267362673626736
8020426735200000352580100801008010040050004923655267352673516672316690801008020016020026735661180201100991008010010000051102192226731800001002673626736267362673626736
8020426735200000352580100801008010040050004923655267352673516672316690801008020016020026735661180201100991008010010000051102192226731800001002673626736267362673626736
8020426735200000352580100801008010040050004923655267352673516672316690801008020016020026735661180201100991008010010000051102192226731800001002673626736267362673626736
8020426735201000352580100801008010040050004923655267352673516672316690801008020016020026735661180201100991008010010000051102192226731800001002673626736267362673626736
80204267352000018352580100801008010040050004923655267352673516672316690801008020016020026735661180201100991008010010004051102192226731800001002673626736267362673626736
8020426735200000352580100801008010040050004923655267352673516672316690801008020016020026735661180201100991008010010000051102192226731800001002673626736267362673626736
8020426735200000352580100801008010040050004923655267352673516672316690801008020016040626735661180201100991008010010000351103192226731800001002673626736267362673626736
8020426735200000352580100801008010040050004923655267352673516672316690801008020016020026735661180201100991008010010000051102192226731800001002673626736267362673626736
8020426735200009352580100801008010040050004923655267352673516672316690801008020016020026735661180201100991008010010000051102192126731800001002673626736267362673626736

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)033f51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)5f60696a6b6d6emap 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)eaec? int retires (ef)f5f6f7f8fd
80024267212003525800108001080010400050014923625026705267051666531668380010800201600202670566118002110910800101000502051835267018000030102670626706267062670626706
80024267052003525800108001080010400050014923625026705267051666531668380010800201600202670566218002110910800101003502031835267018000000102670626706267062670626706
80024267052003525800108001080010400050014923625026705267051666531668380010800201600202670566118002110910800101000502051853267018000000102670626706267062670626706
80024267052003525800108001080010400050014923625026705267051666531668380010800201600202670566118002110910800101000502051853267018000000102670626706267062670626706
80024267052006325800108001080010400050014923625026705267051666531668380010800201600202670566118002110910800101000502051853267018000000102670626706267062670626706
800242670520035258001080010800104000500149236250267052670516665316683800108002016002026705661180021109108001010005020318532670180000016102670626706267062670626706
800242670519910625800108001080010400050014923625026705267051666531668380010800201600202670566118002110910800101000502031853267018000000102670626706267062670626706
80024267052003525800108001080010400050004923625026705267051666531668380010800201600202670566118002110910800101000502051853267018000000102670626706267062670626706
80024267052003525800108001080010400050004923625026705267051666531668380010800201600202670566118002110910800101000502031853267018000000102670626706267062670626706
80024267052003525800108001080010400050014923625026705267051666531668380010800201600202670566118002110910800101000502031835267018000000102670626706267062670626706