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

CINV (64-bit)

Test 1: uops

Code:

  cinv x0, x0, hi
  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)031e3f4d51schedule 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)9faccfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10041035806191725100010001000622501103510358053882100010003000103510411100110001000073227119901000100010361036103610361036
10041035806191725100010001000622500103510358053882100010003000103510411100110001000073127119901000100010361036103610361036
10041035806191725100010001000622501103510358053882100010003000103510411100110001000073127119901000100010361036103610361036
10041035806191725100010001000622500103510358053882100010003000103510411100110001000073127119901000100010361036103610361036
10041035706191725100010001000622500103510358053882100010003000103510411100110001000073127119901000100010361036103610361036
10041035706191725100010001000622500103510358053882100010003000103510411100110001000073127119901000100010361036103610361036
1004103571210391725100010001000622501103510358053882100010003000103510411100110001000073127119901000100010361036103610361036
10041035706191725100010001000622500103510358053882100010003000103510411100110001000373127119901000100010361036103610361036
10041035806191725100010001000622501103510358053882100010003000103510411100110001000073127119901000100010361036103610361036
10041035808491725100010001000622501103510358053882100010003000103510411100110001000073127119901000100010361036103610361036

Test 2: Latency 1->2

Code:

  cinv x0, x0, hi
  mov x0, 1
  mov x1, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 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)st unit uop (a7)l1d cache writeback (a8)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204100357518619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010000071022722999210000101001003610036100361003610036
10204100357501929920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010000071022722999210000101001003610036100361003610036
10204100357601909920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010000071022722999210000101001003610036100361003610036
1020410035760619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010000071022722999210000101001003610036100361003610036
1020410035750619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010000071022722999210000101001003610128100361003610036
1020410035759619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010000071022722999210000101001003610036100361003610036
10204100357501879920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010000071022722999210000101001003610036100361003610036
1020410035750619920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010000071022722999210000101001003610036100361003610036
1020410035750619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010000071022722999210000101001003610036100361003610036
10204100357501269920251010010100101006471521496955100351003586563873210100102003020010035102111020110099100101001010000071022722999210000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 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)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100241003575061991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
100241003575061991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
1002410035750669918251001010010100106472460496955100351003586783875410010100203002010035104111002110910100101001005064022722999310000100101003610036100361003610036
100241003575061991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
1002410035750103991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
100241003575061991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
100241003579961991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
100241003575061991825100101001010010647246049695510035100358678387541001010381300201003510411100211091010010100100064022732999310000100101003610036100361003610036
100241003575061991825100101001010010647246149695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036
100241003575061991825100101001010010647246049695510035100358678387541001010020300201003510411100211091010010100100064022722999310000100101003610036100361003610036

Test 3: Latency 1->3

Chain cycles: 1

Code:

  cinv x0, x1, hi
  tst x0, 1
  mov x0, 1
  mov x1, 2
  mov x2, 3

(non-fused SUB/CBNZ 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)60696a6b6d6emap 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 int alu (97)9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache writeback (a8)a9acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20204200351500000006119926252020020200202001297650149169550200352003517406031748120200202004020020035104112020110099201001000000009900001310328111999220100101002003620036200362003620036
2020420035149000000611992625202002020020200129765014916955020035200351740603174812020020200402002003510411202011009920100100000000000001310128111999220100101002003620036200362003620036
2020420035150000000611992625202002020020200129765014916955020035200351740603174812020020200402002003510411202011009920100100000000000001310128111999220100101002003620036200362003620036
2020420035150000000611992625202002020020200129765014916955020035200351740603174812020020200402002003510411202011009920100100000010000001310128111999220100101002003620036200362003620036
2020420035150000000611992625202002020020200129765014916955020035200351740603174812020020200402002003510411202011009920100100000000000001310128111999220100101002003620036200362003620036
2020420035150000000611992625202002020020200129765014916955020035200351740603174812020020200402002003510411202011009920100100000000000001310128111999220100101002003620036200362003620036
2020420035150000000611992625202002020020200129765014916955020035200351740603174812020020200402002003510411202011009920100100000000000001310128111999220100101002003620036200362003620036
202042003515000000061199262520200202002020012976501491695502003520035174060317481202942020040200200351041120201100992010010000000010500001310128111999220100101002003620036200362003620036
2020420035150000000611992625202002020020200129765014916955020035200351740603174812020020200402002003510411202011009920100100000010300001310128111999220100101002003620036200362003620036
20204200351500000001031992625202002020020200129765014916955020035200351740603174812020020200402002003510411202011009920100100000000300001310128111999220100101002003620036200362003620036

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)181e3f4d51schedule 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 int alu (97)9fl1d tlb miss (a1)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200242003515000061199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000001270127111999520010100102003620036200362003620036
200242003515000061199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000001270127111999520010100102003620036200362003620036
200242003515000061199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000001270127111999520010100102003620036200362003620036
200242003515000061199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000101270127111999520010100102003620036200362003620036
200242003515000061199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000001270127111999520010100102003620036200362003620036
200242003515000061199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000001270127111999520010100102003620036200362003620036
2002420035150000136199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000001270127111999520010100102003620036200362003620036
2002420035150000611991825200202002020020129729714916955200352003517428317504200202002040020200351041120021109200101000004261270127111999520010100102003620036200362003620036
200242003515000061199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000031270127111999520010100102003620036200362003620036
200242003515000061199182520020200202002012972971491695520035200351742831750420020200204002020035104112002110920010100000001270127111999520010100102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  cinv x0, x8, hi
  cinv x1, x8, hi
  cinv x2, x8, hi
  cinv x3, x8, hi
  cinv x4, x8, hi
  cinv x5, x8, hi
  cinv x6, x8, hi
  cinv x7, x8, hi
  mov x8, 9

(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)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3f51schedule 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)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802042674020000002880282780118801188012447991604923660267402674016679616689801248023224029626740661180201100991008010080100000000001115118016002673780018801002674126741267412674126741
802042674020100002370282780118801188012447991614923660267402674016679616689801248023224029626740661180201100991008010080100000000001115118016002673780018801002674126741267412674126741
8020426740201000090282780118801188012447991604923660267402674016679616689801248023224029626740661180201100991008010080100000000001115118016002673780018801002674126741267412674126741
802042674020000003930282780118801188012447991604923660267402674016679616689801248023224029626740661180201100991008010080100000000001115118016002673780018801002674126741267412674126741
8020426740200000000282780118801188012447991604923660267402674016679616689801248023224029626740661180201100991008010080100000000001115118016002673780018801002674126741267412674126741
8020426740200000090282780118801188012447991604923660267402674016679616689801248023224029626740661180201100991008010080100000000001115118016002673780018801002674126741267412674126741
80204267402000000902182780118801188012447991604923660267402674016679616689801248023224029626740661180201100991008010080100000000001115118016002673780018801002674126741267412674126741
80204267402000000302182780118801188012447991604923660267402674016679616689801248023224029626740661180201100991008010080100000000001115118016002673780018801002674126741267412674126741
8020426740201000000282780118801188012447991604923660267402674016679616689801248023224029626740661180201100991008010080100000000001115118016002673780018801002674126741267412674126741
8020426740201000000282780118801188012447991604923660267402674016679616689801248023224029626740661180201100991008010080100000000001115118016002673780018801002674126741267412674126741

1000 unrolls and 10 iterations

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

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)9faccfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
80024267112001236258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800108001005020518232670280000800102670726707267072670726707
80024267062001836258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800108001005020318432670280086800102670726707267072670726707
80024267062001836258001080010800104720591492362626706267061666531668480010800202400202670666118002110910800108001005020218222670280000800102670726707267072670726707
80024267062001836258001080010800104720591492362626706267061666531668480010800202400202670666118002110910800108001005020218222670280000800102670726707267072670726707
8002426706200036258001080010800104720591492362626706267061666531668480292800202400202670666118002110910800108001005020218222670280000800102670726707267072670726707
800242670620015636258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800108001005020218222670280000800102670726707267072670726707
80024267062001836258001080010800104720591492362626706267061666531668480010800202400202670666118002110910800108001005020318322670280000800102670726707267072670726707
80024267062002136258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800108001005020418442670280000800102670726707267072670726707
80024267062001836258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800108001005020218442670280000800102670726707267072670726707
80024267062001836258001080010800104720590492362626706267061666531668480010800202400202670666118002110910800108001005020218322670280000800102670726707267072670726707