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

Test 1: uops

Code:

  cmn x0, x1, sxtx
  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)03mmu table walk instruction (07)l2 tlb miss instruction (0a)1e3a3f51schedule 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
1004369311024325100010001000500013693692063225100010002000369661110011000077418443661000370370370370370
1004369211024325100010001000500013693692063225100010002000369661110011000077418443661000370370370370370
1004369311024325100010001000500003693692063225100010002000369661110011000077418443661000370370370370370
1004369311024325100010001000500003693692063225100010002000369661110011000077418443661000370370370370370
1004369211024325100010001000500003693692063225100010002000369661110011000077418443661000370370370370370
1004369211024325100010001000500003693692063225100010002000369661110011000077418443661000370370370370370
1004369211024325100010001000500003693692063225100010002000369661110011000077418443661000370370370370370
1004369211024325100010001000500013693692063225100010002000369661110011000077418443661000370370370370370
1004369311024325100010001000500003693692063225100010002000369661110011000077418443661000370370370370370
10043693110213825100010001000500003693692063225100010002000369661110011000077418443661000370370370370370

Test 2: Latency 3->1

Chain cycles: 1

Code:

  cmn x0, x1, sxtx
  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)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 miss (a1)l1d cache writeback (a8)accfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202042003515000061199262520100201002010012971500491695520035200351740631748120100202003020020035104112020110099100201001010000013101428221999220000101002003620036200362003620036
202042003515000061199262520100201002010012971500491695520035200351740631748120100202003020020035104112020110099100201001010000313101228221999220000101002003620036200362003620036
2020420035150010611992625201002010020100129715004916955200352003517406317481201002020030200200351041120201100991002010010100438013101228221999220000101002003620036200362003620036
202042003515000061199262520100201002010012971500491695520035200351740631748120100202003020020035104112020110099100201001010000013101228221999220000101002003620036200362003620036
202042003515000061199262520100201002010012971500491695520035200351740631748120100202003020020035104112020110099100201001010001013101228221999220000101002003620036200362003620036
202042003515000061199262520100201002010012971500491695520035200351740631748120100202003020020035104112020110099100201001010001013101228221999220000101002003620036200362003620036
2020420035150000611992625201002010020100129715004916955200352003517406317481201002020030200200351041120201100991002010010100001513101228221999220000101002003620036200362003620036
202042003515010061199262520100201002010012971500491695520035200351740631748120100202003020020035104112020110099100201001010000013101228221999220000101002003620036200362003620036
202042003515000061199262520100201002010012971500491695520035200351740631748120100202003020020035104112020110099100201001010000013101228221999220000101002003620036200362003620036
2020420035150000611992625201002010020100129715004916955200352003517406317481201002020030200200351041120201100991002010010100054613101228221999220000101002003620036200362003620036

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 cache writeback (a8)acbranch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100100001270327111999520000100102003620036200362003620036
20024200351502108219918252001020010200101297247049169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724704916955200352003517428317504200102002030020200351041120021109102001010010010501270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247049169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
2002420035150008219918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100101001270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247049169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
2002420035150008219918252001020010200101297247049169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247049169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724704916955200352003517428317504200102002030020200351041120021109102001010010010201270127111999520000100102003620036200362003620036
20024200351500053619918252001020010200101297247049169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  cmn x0, x1, sxtx
  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)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)9fld unit uop (a6)l1d cache writeback (a8)acc2cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202042003515001681992625201002010020100129715014916955200352003517406317481201002020030200200351041120201100991002010010100000013100228321999220000101002003620036200362003620036
202042003515006981992625201002010020100129715004916955200352003517406317481201002020030200200351041120201100991002010010100013013101228221999220000101002003620036200362003620036
20204200351500611992625201002010020100129715014916955200352003517406317481201002020030200200351041120201100991002010010100010013101228221999220000101002003620036200362003620036
20204200351500611992625201002010020100129715014916955200352003517406317506202012020030200200351041120201100991002010010100000013101228221999220000101002003620036200362003620036
202042003515003961991825201002010020100129715004916955200352003517406317481201002047630200200351041120201100991002010010100000013101228221999220000101002003620036200362003620036
2020420035150126141991725201002010020207129778214916955200352003517424317481201002020030200200801041120201100991002010010100070013101228221999220000101002003620036200362003620036
202042003515006119926252010020100201001297150149169552003520035174063174812010020200302002003510411202011009910020100101000210013101228221999220000101002003620036200362003620036
20204200351490611992625201002010020100129715014916955200352003517406317481201002020030200200351041120201100991002010010100000013101228221999220000101002003620036200362003620036
202042003515006311992625201002010020100129715014916955200352003517406317481201002020030200200351041120201100991002010010100000013101228221999220000101002003620036200362003620036
20204200351500611992625201002010020100129715014916955200352003517406317481201002020030200200351041120201100991002010010100000013101228221999220000101002003620036200362003620036

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 cond mispred nonspec (c5)cfd5map dispatch bubble (d6)daddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200242003515006119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100100108012701227012131999520000100102003620036200362003620036
2002420035150039019918252001020010200101297247049169552003520035174283175042001020020300202003510411200211091020010100100001270122701371999520000100102003620036200362003620036
20024200351500611991825200102001020010129724704916955200352003517428317504200102002030020200351041120021109102001010010084012701327012121999520000100102003620036200362003620036
2002420035150061199182520010200102001012972470491695520035200351742831750420010200203002020035104112002110910200101001009901270122701251999520000100102003620036200362003620036
20024200351500611991825200102001020010129724704916955200352003517428317504200102002030020200351041120021109102001010010099012701427013111999520000100102003620036200362003620036
200242003515006119918252001020010200101297247049169552003520035174283175042001020020300202003510411200211091020010100101799012701327012101999520000100102003620036200362003620036
200242003515006119918252001020010200101297247049169552003520035174283175042001020020300202003510411200211091020010100101001270132701361999520000100102003620036200362003620036
2002420035150061199182520010200102001012972471491695520035200351742831750420010200203002020035104112002110910200101001000112701327013141999520000100102003620036200362003620036
20024200351500441199182520010200102001012972470491695520035200351742831750420010200203002020035104112002110910200101001000012701327013121999520000100102003620036200362003620036
20024200351500611991825200102001020010129724704916955200352003517428317504200102002030020200351041120021109102001010010010201270142701361999520000100102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  cmn x0, x1, sxtx
  cmn x0, x1, sxtx
  cmn x0, x1, sxtx
  cmn x0, x1, sxtx
  cmn x0, x1, sxtx
  cmn x0, x1, sxtx
  cmn x0, x1, sxtx
  cmn x0, x1, sxtx
  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)031e3f51schedule 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)st unit uop (a7)l1d cache writeback (a8)accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80204267722010772580100801008010040050014923655267352673516672031669080100802001602002673566118020110099100801001000000051104192226731800001002673626736267362673626736
802042673520101002580100801008010040050014923655267352673516672031669080100802001602002673566118020110099100801001000000051102192226731800001002673626736267362673626736
802042673520001442580100801008010040050004923655267352673516672031669080100802001602002673566118020110099100801001000000051102192226731800001002673626736267362673626736
802042673520001212580100801008010040050004923655267352673516672031669080100802001602002673566118020110099100801001000000051102192226731801351002673626736267362673626736
8020426735200011752580100801008010040050004923655267352673516672031669080100802951602002673566118020110099100801001000000051102192226731800001002673626736267362673626736
80204267352000582580100801008010040050004923655267352673516672031669080100802001602002673566118020110099100801001000000051102192226731800001002673626736267362673626736
802042673520001232580100801008010040050004923655267352673516672031669080100802001602002673566118020110099100801001000000051102192226731800001002673626736267362673626736
802042673520001442580100801008010040050004923655267352673516672031669080100802001602002673566118020110099100801001000000051102192226731800001002673626736267362673626736
802042673520001232580100801008010040050004923655267352673516672031669080100802001602002673566118020110099100801001000000051102192226731802131002673626736267362673626736
8020426735200011962580100801008010040050004923655267352673516672031669080100802001602002673566118020110099100801001000000051102192226731800001002673626736267362673626736

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l2 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 cache writeback (a8)a9accfl1i cache miss demand (d3)d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800242671020000206258001080010800104000500492362526705267051666531668380010800201600202670566118002110910800101000050200218332670180000102670626706267062670626706
80024267052000035258001080010800104000500492362526705267051666531668380010800201600202670566118002110910800101020050200318332670180000102670626706267062670626706
80024267052000035258001080010800104000500492362526705267051666531668380010800201600202670566118002110910800101000050200218232670180000102670626706267062670626706
80024267052000035258001080010800104000500492362526705267051666531668380010800201600202670566118002110910800101000050200218232670180000102670626706267062670626706
80024267052000035258001080010800104000500492362526705267051666531668380010800201600202670566118002110910800101000050200318332670180000102670626706267062670626706
80024267052000035258001080010800104000500492362526705267051666531668380010800201600202670566218002110910800101000050200318322670180000102670626706267062670626706
800242670520000352580010800108001040005004923625267052670516665316683800108002016002026705661180021109108001010410350200318332670180000102670626706267062670626706
80024267052000035258001080010800104000500492362526705267051666531668380010800201600202670566118002110910800101000050200318332670180000102670626706267062670626706
80024267052000035258001080010800104000500492362526705267051666531668380010800201600202670566118002110910800101000050200318322670180000102670626706267062670626706
80024267051990035258001080010800104000500492362526705267051666531668380010800201600202670566118002110910800101000050200318322670180000102670626706267062670626706