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

CMP (uxtx, 64-bit)

Test 1: uops

Code:

  cmp x0, x1, uxtx
  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)l1d cache writeback (a8)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
100436930362510001000100050003693692063225100010002000369661110011000073318223661000370370370370370
100436930362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370
100436930362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370
100436930362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370
100436930362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370
100436920362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370
100436920572510001000100050003693692063225100010002000369661110011000073218223661000370370370370370
100436920362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370
100436920362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370
100436920362510001000100050003693692063225100010002000369661110011000073218223661000370370370370370

Test 2: Latency 3->1

Chain cycles: 1

Code:

  cmp x0, x1, uxtx
  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)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)branch mispred nonspec (cb)cdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202042003515006119930252010020100201121297233149169552006820035174256174872011220224302362003510411202011009910020100101000011113180216112001120000101002003620036200362003620036
2020420035149061199302520100201002011212972331491695520035200351742561748720112202243023620035104112020110099100201001010016011113180116112001120000101002003620036200362003620036
202042003515006119930252010020100201121297233149169552003520035174256174872011220224302362003510411202011009910020100101000011113180116112001120000101002003620036200362003620036
20204200351500611993025201002010020112129723314916955200812003517425617487201122022430236200351041120201100991002010010100316311113180116112001120000101002003620036200812003620036
202042003515006119930252010020100201121297233149169552003520035174256174872011220224302362003510411202011009910020100101000000013101228221999220000101002003620036200362003620036
202042003515006119926252010020100201001297150149169552003520035174063174812010020200302002003510411202011009910020100101000000013101228221999220000101002003620036200362003620036
202042003515006119926252010020100201001297150149169552003520035174063174812010020200302002003510411202011009910020100101000000013101228221999220000101002003620036200362003620036
202042003515006119926252010020100201001297150149169552003520035174063174812010020200302002003510411202011009910020100101003300013101228221999220000101002003620036200362003620036
202042003515006119926252010020100201001297150149169552003520035174063174812010020200302002003510411202011009910020100101000000013101228222003020000101002003620036200362003620036
202042003515006119926252010020100201001297150149169552003520035174063174812010020200302002003510411202011009910020100101000000013101228221999220000101002003620036200362003620036

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)accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200242003515006119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
2002420035150010319918252001020010200101297247049169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
2002420035150057819918252001020010200101297247049169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
200242003515006119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
2002420035150621619918252001020010200101297247049169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
200242003515006119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
200242003515006119918252001020010200101297247049169552003520035174283175042001020020300202003510411200211091020010100100301286227111999520000100102003620036200362003620036
200242003515006119918252001020010200101297247049169552003520035174283175042001020020300202003510411200211091020010100100011270227221999520000100102003620036200362003620036
200242003515006119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
200242003515006119918252001020010200101297247049169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  cmp x0, x1, uxtx
  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)03mmu table walk instruction (07)mmu table walk data (08)18191e1f3a3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)696a6b6d6emap 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)st unit uop (a7)l1d cache writeback (a8)a9acc2cfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202042003515000000006119926252010020100201001297150491695502003520035174073174812010020200302002003510411202011009910020100101000000000013101427531999220000101002003620036200362003620036
2020420035150000000061199262520100201002010012971284916955020035200351740731748220125202003020020035111112020110099100201001010000002503013101228221999220000101002003620036200362003620036
202042003515000000006119926252010020100201001297150491695502003520035174063174812010020200302002003510411202011009910020100101000000400013101228221999220000101002003620036200362003620036
20204200351500000000611991910520209202092053313002174917000020260202181745524175812053220569307712026210461202011009910020100101000420143990213971267332013120134101002025420264202612026420263
20204202611510055267440013201991912620234202372044813002044917183020259202601744612175832053020669309092026211141202011009910020100101002201123428014171361322013120136101002021520260202612017420262
20204202631520155660440114391991613020234202342053612996104917180020307203061745229176042053320673309222026310461202011009910020100101002402024045214151269222016320087101002030020265201282030720261
2020420259152005567244001270199161252025420235204541298384491718202021920261174553176082061520677309172025910461202011009910020100101002200121428014131328232016320133101002026220306202642026220264
20204202611520077795528016111991512720100202342053312995954916955020035202641740721174922053620200302002008010461202011009910020100101000201021595013101228221999220000101002003620036200362003620036
202042003515000000006119926252012520125201251297128491695532003520035174063174812010020200302002003510411202011009910020100101000000000013121228341999220025101002003620036200362003620036
202042003515010000006119926252010020100201001297150491695502003520035174063174812010020200302002003510411202011009910020100101000000500013101227421999220000101002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l2 tlb miss data (0b)1e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)60696a6b6d6emap 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)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200242003515000611991825200102001020010129724714916955020035200351742831750420010200203002020035104112002110910200101001001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724704916955320035200351742831750420010200203002020035104112002110910200101001001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724704916955020035200351742831750420010200203002020035104112002110910200101001001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724714916955020035200351742831750420010200203002020035104112002110910200101001001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724714917000020035200351742831750420010200203002020035104112002110910200101001001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724714916955020035200351742831750420010200203002020035104112002110910200101001001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724714916955020035200351742831750420010200203002020035104112002110910200101001001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724714916955020035200351742831750420010200203002020035104112002110910200101001001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724714916955020035200351742831750420010200203002020035104112002110910200101001001270227111999520000100102003620036200362003620036
200242003515000611991825200102001020010129787414916955020035200351742831750420010200203002020035104112002110910200101001001270127111999520000100102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  cmp x0, x1, uxtx
  cmp x0, x1, uxtx
  cmp x0, x1, uxtx
  cmp x0, x1, uxtx
  cmp x0, x1, uxtx
  cmp x0, x1, uxtx
  cmp x0, x1, uxtx
  cmp x0, x1, uxtx
  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)031e1f3f51schedule 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)9fld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802042677020012016725801008010080100400500492365526735267351667231669080100802001602002673566118020110099100801001000013051102191126731800001002678326736267362673626789
8020426735200010479425801008010080100400500492365526785267351667231669080100802001602002673566118020110099100801001000000051101191126731800001002673626736267362673626736
8020426735200003525801008010080100400500492365526735267351667231669080100802001602002673566118020110099100801001000000051101191126731800001002673626736267362673626736
80204267352011203525801008010080100400500492365526735267351667231669080100802001602002673566118020110099100801001000000051101191126731800001002673626736267362673626736
80204267352006064825801008010080100400500492365526735267351667231669080100802001602002673566118020110099100801001000000051101191126731800001002673626736267362673626736
8020426735200003525801008010080100400500492365526735267351667231669080100802001602002673566118020110099100801001000000051101191126731800001002673626736267362673626736
80204267352000044825801008010080100400500492365526735267351667231669080100802001602002673566118020110099100801001000000051101191126731800001002673626736267362673626736
80204267352010050225801008010080100400500492365526735267351667231669080100802001602002673566118020110099100801001000000151101191126731800001002673626736267362673626736
80204267352000012325801008010080100400500492365526735267351667231669080100802001602002673566118020110099100801001000000051101191126731800001002673626736267362673626736
8020426735200005625801008010080100400500492365526735267351667231669080100802001602002673566118020110099100801001000000051101191126731800001002673626736267362673626736

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)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 tlb access (a0)l1d cache writeback (a8)a9cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800242672020000772580010800108001040005049236252670526705166653166838001080020160020267056611800211091080010100005020318112670180000102670626706267062670626706
800242670520000352580010800108001040005049236252670526705166653166838001080020160020267056611800211091080010100005020118112670180000102670626706267062670626706
800242670520000352580010800108001040005049236252670526705166653166838001080020160020267056611800211091080010100005020118112670180000102670626706267062670626706
800242670520000352580010800108001040005049236252670526705166653166838001080020160020267056611800211091080010100005020118112670180000102670626706267062670626706
800242670520000562580010800108001040005049236252670526705166653166838001080020160020267056611800211091080010100005020118112670180000102670626706267062670626706
800242670520010802580010800108001040005049236252670526705166653166838001080020160020267056611800211091080010100005020118112673980000102670626706267062670626706
800242670520000352580010800108001040005049236252670526705166653166838001080020160020267056611800211091080010100005020118112670180000102670626706267062670626706
800242670520000352580010800108001040005049236252670526705166653166838001080020160020267056611800211091080010100005020118112670180000102670626706267062670626706
800242670520000352580010800108001040005049236252670526705166653166838001080020160020267056611800211091080010100005020118112670180000102670626706267062670626706
800242670520000352580010800108001040005049236252670526705166653166838001080020160020267056611800211091080010100005020118112670180000102675326706267062670626706