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 (sxtw, 32-bit)

Test 1: uops

Code:

  cmp w0, w1, sxtw
  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)033f51schedule 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)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)f5f6f7f8fd
10043693362510001000100050001369369206322510001000200036966111001100073118113661000370370370370370
10043693752510001000100050001369369206322510001000200036966111001100073118113661000370370370370370
10043693362510001000100050001369369206322510001000200036966111001100073118113661000370370370370370
10043692362510001000100050001369369206322510001000200036966111001100073118113661000370370370370370
10043693362510001000100050001369369206322510001000200036966111001100073118113661000370370370370370
10043693362510001000100050001369369206322510001000200036966111001100073118113661000370370370370370
10043693782510001000100050001369369206322510001000200036966111001100073118113661000370370370370370
10043692362510001000100050001369369206322510001000200036966111001100073118113661000370370370370370
10043693362510001000100050001369369206322510001000200036966111001100073118113661000370370370370370
10043693362510001000100050001369369206322510001000200036966111001100073118113661000370370370370370

Test 2: Latency 3->1

Chain cycles: 1

Code:

  cmp w0, w1, sxtw
  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)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3f4d51schedule 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)l1d tlb miss (a1)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc2cdcfd0d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)ea? int retires (ef)f5f6f7f8fd
20204200351500000006119926252010020100201001297150149169552003520035174060317481201002020030200200351041120201100991002010010100000000000131012282219992200000101002003620036200362003620036
20204200351500000006119926252010020100201001297150149169552003520035174060317481201002020030200200351041120201100991002010010100000000000131012282219992200000101002003620036200362003620036
20204200351500000006119926252010020100201001297150149170012003520080174060317481201002020030200200351041120201100991002010010100000000000131012283219992200000101002003620036200362003620036
20204200351500000006119926252010020100201001297150149169552003520035174060317481201002020030200200351041120201100991002010010100000000000131012282219992200000101002003620036200362003620036
20204200351500000006119926252010020100201001297150149169552003520035174060317481201002020030200200351041120201100991002010010100000000000131012282219992200000101002003620036200362003620036
20204200351500000006119926252010020100201001297150149169552003520035174060317481201002020030200200351041120201100991002010010100000000000131012282219992200000101002003620036200362003620036
20204200351500000006119926252010020100201001297150149169552003520071174060317481201002020030200200351041120201100991002010010100000000000131012282519992200000101002003620036200362003620036
20204200351500000006119926252010020100201001297150149169552003520035174060317481201002020030200200351041120201100991002010010100000000000131012282219992200000101002003620036200362003620036
20204200351500000006119926252010020100201001297150149169552003520035174060317481201002020030200200351041120201100991002010010100000000000131012282219992200000101002003620036200362003620036
20204200351500000006119926252010020100201001297150149169552003520035174060317481201002020030200200351041120201100991002010010100000030000131012282219992200000101002003620036200362003620036

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)9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache writeback (a8)a9acbranch cond mispred nonspec (c5)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024200351500966119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100100000001270427121999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100100000001270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100100000001270127111999520000100102003620036200362003620036
20024200351500666119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100100000001270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100100000001270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100100000001270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100100000001270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100100000001270127111999520000100102003620036200362003620036
200242003515004253619918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100100000001270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247149169552003520035174283175042001020020300202003510411200211091020010100100000001270127111999520000100102003620036200362003620036

Test 3: Latency 3->2

Chain cycles: 1

Code:

  cmp w0, w1, sxtw
  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)03181e3f4d51schedule uop (52)schedule int uop (53)dispatch int uop (56)int uops in schedulers (59)6061696a6d6emap 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
202042003515000156199302520100201002011212972331049169552003520035174256174872011220224302362003510411202011009910020100101000011113180116112001120000101002003620036200362003620036
202042003515000673199302520100201002011212972330049169552003520035174256174872011220224302362003510411202011009910020100101000011113180116112001120000101002003620036200362003620036
20204200351500061199262520100201002010012971500049169552003520035174063174812010020200302002003510411202011009910020100101000000013100228221999220000101002003620036200362003620036
20204200351490061199262520100201002010012971500049169552003520035174063174812010020200302002008010421202011009910020100101000000013101228221999220000101002003620036200362003620036
20204200351500061199262520100201002010012971501049169552003520035174063174812010020200302002003510411202011009910020100101000000013101228221999220000101002003620036200362003620036
20204200351500061199262520100201002010012971500049169552003520035174063174812010020200302002003510411202011009910020100101000000013101228221999220000101002003620036200362003620036
20204200351500061199262520100201002010012971500049169552003520035174063174812010020200302002003510411202011009910020100101000000013101228221999220000101002003620036200362003620036
20204200351500061199262520100201002010012971500049169552003520035174063174812010020200302002003510411202011009910020100101000000013101228222009520000101002003620036200362003620036
2020420035150114461199262520100201002010012971501049169552003520035174063174812010020200302002003510411202011009910020100101000000013101228221999220000101002003620036200362003620036
20204200351500061199262520100201002010012971500049169552003520035174063174812010020200302002003510411202011009910020100101000000013101228221999220000101002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03191e3f4d51schedule 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)ld unit uop (a6)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200242003515039611991825200102001020010129724749169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724749169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
2002420035150006119918252001020010200101297247491695520035200351742812175042001020020300202003510411200211091020010100100001270127211999520000100102003620036200362003620036
200242003515000611991825200102001020010129724749169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724749169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724749169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
2002420035150018611991825200102001020010129724749169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724749169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
2002420035150018611991825200102001020010129724749169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036
200242003515000611991825200102001020010129724749169552003520035174283175042001020020300202003510411200211091020010100100001270127111999520000100102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  cmp w0, w1, sxtw
  cmp w0, w1, sxtw
  cmp w0, w1, sxtw
  cmp w0, w1, sxtw
  cmp w0, w1, sxtw
  cmp w0, w1, sxtw
  cmp w0, w1, sxtw
  cmp w0, w1, sxtw
  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)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)? int retires (ef)f5f6f7f8fd
8020426771200035258010080100801004005001492365526735267351667231669080100802001602002673566118020110099100801001000051102191126731800001002673626736267362673626736
8020426735200035258010080100801004005001492365526735267351667231669080100802001602002673566118020110099100801001000051101191126731800001002673626736267362673626736
8020426735200035258010080100801004005000492365526735267351667231669080100802001602002673566118020110099100801001000051101191126731800001002673626736267362673626736
8020426735200035258010080100801004005001492365526735267351667231669080100802001602002673566118020110099100801001000051101192126731800001002673626736267362673626736
8020426735201035258010080100801004005000492365526735267351667231669080100802001602002673566118020110099100801001000051101191126731800001002673626736267362673626736
8020426735200035258010080100801004005001492365526735267351667231669080100802001602002673566118020110099100801001000051101191126731800001002673626736267362673626736
8020426735200035258010080100801004005001492365526735267351667231669080100802001602002673566118020110099100801001000051101191126731800001002673626736267362673626736
8020426735200035258010080100801004005001492365526735267351667231669080100802001602002673566118020110099100801001000051101191126731800001002673626736267362673626736
8020426735200035258010080100801004005001492365526735267351667231669080100802001602002673566118020110099100801001000051101191126731800001002673626736267362673626736
8020426735200035258010080100801004005001492365526735267351667231669080100802001602002673566118020110099100801001000051101191126731800001002673626736267362673626736

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)5f60696a6d6emap 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)accfd5map dispatch bubble (d6)daddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800242671020000352580010800108001040005000492362526705267051666531668380010800201600202670566118002110910800101000050203180352670180000102670626706267062670626706
800242670520000352580010800108001040005000492362526705267051666531668380010800201600202670566118002110910800101000050203180452670180000102670626706267062670626706
800242670520000352580010800108001040005000492362526705267051668231668380010800201600202670566118002110910800101000050204180442670180000102670626706267062670626706
800242670520000352580010800108001040005000492362526705267051666531668380010800201600202670566118002110910800101000050202180452670180000102670626706267062670626706
800242670520000352580010800108001040005000492362526705267051666531668380010800201600202670566118002110910800101000050205180532670180000102670626753267062670626706
800242670520000352580010800108001040005000492362526705267051666531668380010800201600202670566118002110910800101000050203180442670180000102670626706267062670626706
8002426705200002092580010800108001040005000492362526705267051666531668380078800201600202670566118002110910800101000050203180442670180000102670626706267062670626706
800242670519900352580010800108001040005000492362526705267051666531668380010800201600202670566118002110910800101000050204180442670180000102670626706267062670626706
8002426705207012352580010800108001040005000492362526705267051666531668380010800201600202670566118002110910800101000050203180322670180000102670626706267062670626706
800242670520000352580010800108001040005000492362526705267051666531668380010800201600202670566118002110910800101000050204180432670180000102670626706267062670626706