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

Test 1: uops

Code:

  cinv w0, w0, 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)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)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10041035808291725100010221000622501035103580538821000100030001035104111001100010000073227119901000100010361036103610361036
10041035806191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
10041035806191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
10041035706191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
10041035806191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
10041035706191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
10041035706191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
10041035706191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
10041035806191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
10041035806191725100010001000622501035103580538821000100030001035104111001100010000073127119901000100010361036103610361036

Test 2: Latency 1->2

Code:

  cinv w0, w0, 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)03mmu table walk data (08)18191e3f4d51schedule 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)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102041003575000014799202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010100000071012711999210000101001003610036100361003610036
10204100357500006199202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010100010071012711999210000101001003610036100361003610036
10204100357500006199202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010100000071012711999210000101001003610036100361003610036
10204100357500006199202510100101001010064715214969551003510035865638732101001029830200100351021110201100991001010010100000071012711999210000101001003610036100361003610036
10204100357510006199202510100101001010064715204969551003510035865638732101001020030200100351021110201100991001010010100000074712711999210000101001003610036100361003610036
10204100357500006199202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010100000071012711999210000101001003610036100361003610036
10204100357500006199202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010100000071012711999210000101001003610036100361003610036
102041003575030010399202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010100000071012711999210000101001003610036100361003610036
10204100357500006199202510100101001010064715214969551003510035865638732101001020030200100351021110201100991001010010100000071012711999210000101001003610036100361003610036
10204100357500006199202510100101001010064774914969551003510035865638753101001020030200100351021110201100991001010010100400071012711999210000101001003610036100361003610036

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)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002410035750619918251001010010100106472460496955100351003586783875410010100203002010035104111002110910100101001000064022722999310000100101003610036100361003610036
1002410035750619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001000064022722999310000100101003610036100361003610036
10024100357501569918251001010010100106472460496955100351003586783875410010100203002010035104111002110910100101001000064022722999310000100101003610036100361003610036
10024100357501689918251001010010100106472460496955100351003586783875410010100203002010035104111002110910100101001000064022722999310000100101003610036100361003610036
1002410035750849918251001010010100106472460496955100351003586783875410010100203002010035104111002110910100101001000664022722999310000100101003610036100361003610036
1002410035750619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001000064022722999310000100101003610036100361003610036
10024100357506139918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001000064022722999310000100101003610036100361003610036
1002410035750619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001000064022722999310000100101003610036100361003610036
1002410035750619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001000064022722999310000100101003610036100361003610036
1002410035750619918251001010010100106472461496955100351003586783875410010100203002010035104111002110910100101001001064022722999310000100101003610036100361003610036

Test 3: Latency 1->3

Chain cycles: 1

Code:

  cinv w0, w1, 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)191e3a3f4d51schedule 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 access (a0)l1d tlb miss (a1)st unit uop (a7)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
202042003515000000611992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000000001310128111999220100101002003620036200362003620036
202042003515000000611992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000000231310128111999220100101002003620036200812003620036
202042003515000000611992625202002020020200129765004916955200352003517406317481202002020040200200351041120201100992010010000000001310128111999220100101002003620036200362003620036
202042003515000000611992625202002020020200129765004916955200352003517406317481202002020040200200351041120201100992010010000000001310228111999220100101002003620036200362003620036
2020420035150010007261992625202002020020200129765004916955200352003517406317481202002020040200200351041120201100992010010000000001310128111999220100101002003620036200362003620036
202042003515000000611992625202002020020200129765004916955200352003517406317481202002020040200200351041120201100992010010000000001310128111999220100101002003620036200362003620036
2020420035150000006119926252020020200202001297650149169552003520035174063174812020020200402002003510411202011009920100100002004931310128111999220100101002003620036200362003620036
202042003514900000611992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000000101310128111999220100101002003620036200362003620036
202042003515000000611992625202002020020200129765004916955200352003517406317481202002020040200200351041120201100992010010000000401310128121999220100101002003620036200362003620036
202042003515000000611992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000000001310128111999220100101002003620036200362012620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)18191e3f4d51schedule 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 access (a0)l1d tlb miss (a1)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2002420035150000061199182520020200202002012972970491695520035200351742831750420020200204002020035104112002110920010100000008231291327531999520010100102003620036200362003620036
20024200351500000611991825200202002020020129729704916955200352003517428317504200202002040020200791041120021109200101000000001270427571999520010100102003620036200362003620036
20024200351500000611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200101000000061270327331999520010100102003620036200362003620036
20024200351500000611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200101000000001270427451999520010100102003620036200362003620036
20024200351500000611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200101000000001270427441999520010100102003620036200362003620036
20024200351500000611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200101000000001270427441999520010100102003620036200362003620036
20024200351500000611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200101000000001270227421999520010100102003620036200362003620036
20024200351500000611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200101000000001270427541999520010100102003620036200362003620036
20024200351500000611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200101000000001270327331999520010100102003620036200362003620036
20024200351500000611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200101000000001270427441999520010100102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  cinv w0, w8, hi
  cinv w1, w8, hi
  cinv w2, w8, hi
  cinv w3, w8, hi
  cinv w4, w8, hi
  cinv w5, w8, hi
  cinv w6, w8, hi
  cinv w7, w8, hi
  mov x8, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)l2 tlb miss instruction (0a)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)9fbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020426764200011869327801188011880124479916049236602674026740166796166898012480232240296267406611802011009910080100801001115118116112673780018801002674126741267412674126741
802042674020111182827801188011880124479916049236602674026740166796166898012480232240296267406611802011009910080100801001115118116112673780018801002674126741267412674126741
802042674020011152827801188011880124479916049236602674026740166796166898012480232240296267406611802011009910080100801001115180116112673780018801002674126741267412674126741
80204267402001102827801188011880124479916049236602674026740166796166898019380232240296267406611802011009910080100801001115118116122673780018801002674126741267412674126741
80204267402001106433801158011580121479097049236722675226751166769166868012180230240290267516611802011009910080100801002225128226222674880015801002675226753267522675226752
80204267522000006433801158011580121479097049236712675126751166769166868012180230240290267516611802011009910080100801002225128226222674980015801002675226752267522675226752
802042675120000156434801158011580121479097049236712675226751166769166868012180230240290267526611802011009910080100801002225129326222674880015801002675326753267522675226752
802042675220100276433801158011580121479097049236712675126751166769166868012180230240290267516611802011009910080100801002225128226222674880015801002675226753267522675226752
80204267512010006433801158011580121479097049236712675126752166769166868012180230240290267516611802011009910080100801002225129226222674880015801002675226752267532675226753
802042675120000786434801158011580121479097049236722675126752166769166868012180230240290267516611802011009910080100801002225129226222674880015801002675226752267522675226752

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)030918191e3f51schedule 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)9fld unit uop (a6)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)eb? int retires (ef)f5f6f7f8fd
80024267242000000362580010800108001047205904923626026706267061666531668480010800202400202670666118002110910800108001000050203181126702800000800102670726707267072670726707
80024267062000000362580010800108001047205914923626026706267061666531668480010800202400202670666118002110910800108001000050201181126702800000800102670726707267072670726707
80024267062000000362580010800108001047205914923626026706267061666531668480010800202400202670666118002110910800108001000050201181126702800000800102670726707267072670726707
80024267062000000362580010800108001047205914923626026706267061666531668480010800202400202670666118002110910800108001000050201181126702800000800102670726707267072670726707
80024267062000000362580010800108001047205904923626026706267061666531668480010800202400202670666118002110910800108001000050201181126702800000800102670726707267072670726707
80024267062000000362580010800108001047205904923626026706267061666531668480010800202400202670666118002110910800108001000050201181126702800000800102670726707267072670726707
80024267062000000362580010800108001047205914923626026706267061666531668480010800202400202670666118002110910800108001000050201181126702800000800102670726707267072670726707
80024267062001000362580010800108001047205914923626026706267061666531668480010800202400202670666118002110910800108001000050201181126702800000800102670726707267072670726707
80024267062000000362580010800108001047205904923626026706267061666531668480010800202400202670666118002110910800108001000050201181126702800000800102670726707267072670726707
80024267062000000362580010800108001047205904923626026706267061666531668480010800202400202670666118002110910800108001000050201181126702800000800102670726707267072670726707