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

CNEG (64-bit)

Test 1: uops

Code:

  cneg 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)03mmu table walk data (08)09l2 tlb miss data (0b)18191e1f3f4d51schedule 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)9fld unit uop (a6)a9accfd5map dispatch bubble (d6)daddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1004103570000000619172510001000100062250103510358053882100010003000103510411100110001000000731270119901000100010361036103610361036
1004103580000000619172510001000100062250103510358053882100010003000103510411100110001000000731270119901000100010361036103610361036
10041035700000002769172510001000100062250103510358053882100010003000103510411100110001000000731270119901000100010361036103610361036
1004103570000000619172510001000100062250103510358053882100010003000103510411100110001000000731270119901000100010361036103610361036
1004103580000000619172510001000100062250103510358053882100010003000103510411100110001000000731270119901000100010361036103610361036
1004103580000000619172510001000100062250103510358053882100010003000103510411100110001000000731270119901000100010361036103610361036
1004103570000000619172510001000100062250103510358053882100010003000103510411100110001000000731270119901000100010361036103610361036
1004103570000000619172510001000100062250103510358053882100010003000103510411100110001000000731270119901000100010361036103610361036
1004103580000000619172510001000100062250103510358053882100010003000103510411100110001000000731270119901000100010361036103610361036
1004103570000000619172510001000100062250103510358053882100010003000103510411100110001000000731270119901000100010361036103610361036

Test 2: Latency 1->2

Code:

  cneg 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)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 cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204100357500061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
102041003575000128992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100357500061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361006810036
10204100357500061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100357500084992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100357600061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100357500061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100357600061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100357500061992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036
10204100357500082992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000071012711999210000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 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)ld unit uop (a6)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002410035750306199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010010000064032733999310000100101003610036100361003610036
100241003575006199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010000064032733999310000100101003610036100361003610036
1002410035750366199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010000064032733999310000100101003610036100361003610036
1002410035750025199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010000064032733999310000100101003610036100361003610036
100241003575006199182510010100101001064754504969551003510035867838754100101002030020100351041110021109101001010010000064032733999310000100101003610036100361003610036
100241003575006199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010010200064032733999310000100101003610036100361003610036
100241003575006199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010000064032733999310000100101003610036100361003610036
100241003575006199182510010100101001064724604969551003510035867838754100101002030020100351041110021109101001010010000064032733999310000100101003610036100361003610036
100241003575006199182510010100101001064724614969551003510035867838754100101002030020100351041110021109101001010010001064032733999310000100101008110036100821003610036
100241003575106199182510010100101001064724614969551003510080868938754100101002030020100351041110021109101001010010001064032733999310000100101003610036100361003610036

Test 3: Latency 1->3

Chain cycles: 1

Code:

  cneg 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)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)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2020420035150000000611992625202002020020200129765004916955200352003517406317481202002020040200200351041120201100992010010000000010001310128111999220100101002003620036200362003620036
20204200351500000002331992625202002020020200129765004916955200352003517406317481202002020040200200351041120201100992010010000000000001310128111999220100101002003620036200362003620036
2020420035150000000611992625202002020020200129765004917135200352003517406317481202002020040200200351041120201100992010010000000000001310128111999220100101002003620036200362003620036
20204200351500000121081031992625202002020020200129765004916955200352003517406317481202002020040200200351041120201100992010010000000000001310128111999220100101002003620036200362003620036
20204200351500000002321992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000000000001310128111999220100101002003620036200362003620036
2020420035150000000611992625202002020020200129765004916955200352003517406317481202002020040200200351041120201100992010010000000000001310128111999220100101002003620036200362003620036
2020420035150000000611992625202002020020200129765004916955200352003517406317481202002020040200200351041120201100992010010000000000001310128111999220100101002003620036200362003620036
2020420035150000000611992625202002020020200129765004916955200352003517406317481202002020040200200351041120201100992010010000000000001310128111999220100101002003620036200362003620036
20204200351500001001701992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000000000001310128111999220100101002003620036200362003620036
2020420035150000000821992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000000000001310128111999220100101002003620036200362003620036

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)9faccfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
20024200351490001451991825200202002020020129729714916955200352003517428317504200202002040020200351041120021109200101000001270127111999520010100102003620036200362003620036
2002420035150000611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200101000061270127111999520010100102003620036200362003620036
2002420035150000611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200101000001270127111999520010100102003620036200362003620036
20024200351500004001991825200202002020020129729714916955200352003517428317504200202002040020200351041120021109200101000001270127111999520010100102003620036200362003620036
20024200351500001031991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200101000001270127121999520010100102003620036200362003620036
2002420035150000611991825200202002020020129729704916955200352003517428317504200202002040020200351041120021109200101000001270127111999520010100102003620036200362003620036
20024200351500001071991832200202002020020129729714916955200352003517428317504200202002040020200351041120021109200101000001270127111999520010100102003620036200362003620036
20024200351500004441991825200202002020020129729714916955200352003517428317504200202002040020200351041120021109200101000001270127111999520010100102003620036200362003620036
20024200351500003461991825200202002020020129729714916955200352003517428317504200202002040020200351041120021109200101000001270127111999520010100102003620036200362003620036
2002420035150000611991825200202002020020129729714916955200352003517428317504200202002040020200351041120021109200101000001270127111999520010100102003620036200362003620036

Test 4: throughput

Count: 8

Code:

  cneg x0, x8, hi
  cneg x1, x8, hi
  cneg x2, x8, hi
  cneg x3, x8, hi
  cneg x4, x8, hi
  cneg x5, x8, hi
  cneg x6, x8, hi
  cneg 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)03l2 tlb miss instruction (0a)181e3f51schedule 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)9facc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020426764200200282780118801188012447991614923660267402674016679616689801248023224029626740661180201100991008010080100001115118116112673780018801002674126741267412674126741
8020426740201000282780118801188012447991614923660267402674016679616689801248023224029626740661180201100991008010080100001115118116112673780018801002674126741267412674126741
8020426740201000282780118801188012447991614923660267402674016679616689801248023224029626740661180201100991008010080100001115118116112673780018801002674126741267412674126741
8020426740200000282780118801188012447991614923660267402674016679616689801248023224029626740661180201100991008010080100001115118116112673780018801002674126741267412674126741
8020426740200000282780118801188012447991614923660267402674016679616689801248023224029626740661180201100991008010080100001115118116112673780018801002674126741267412674126741
8020426740200000282780118801188012447991614923660267402674016679616689801248023224029626740661180201100991008010080100001115118116112673780018801002674126741267412674126741
80204267402000001372780118801188012447991614923660267402674016679616689801248023224029626740661180201100991008010080100001115118116112673780018801002674126741267412674126741
8020426740200000282780118801188012447991614923660267402674016679616689801248023224029626740661180201100991008010080100001115118116112673780018801002674126741267412674126741
8020426740200000282780118801188012447991614923660267402674016679616689801248023224029626740661180201100991008010080100001115118116112673780018801002674126741267412674126741
8020426740200000282780118801188012447991614923660267402674016679616689801248023224029626740661180201100991008010080100001115118116112673780018801002674126741267412674126741

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)5f60696a6b6d6emap 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)d9daddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8002426724199036258001080010800104720590149236260267062670616665316684800108002024002026706661180021109108001080010050201718006162670280000800102670726707267072670726707
80024267062000362580010800108001047205901492362602670626706166653166848001080020240020267066611800211091080010800100502016180018162670280000800102670726707267072670726707
8002426706199036258001080010800104720590149236260267062670616665316684800108002024002026706661180021109108001080010050201618001662670280000800102670726707267072670726707
8002426706200036258001080010800104720590149236260267062670616665316684800108002024002026706661180021109108001080010050201618001662670280000800102670726707267072670726707
80024267062000362580010800108001047205901492362602670626706166653166848001080020240020267066611800211091080010800100502016180016162670280000800102670726707267072670726707
8002426706200036258001080010800104720590149236260267062670616665316684800108002024002026706661180021109108001080010050201618001662670280000800102670726707267072670726707
8002426706200036258001080010800104720590149236260267062670616665316684800108002024002026706661180021109108001080010050201618001662670280000800102670726707267072670726707
800242670620003625800108001080010472059014923626026706267061666531668480010800202400202670666118002110910800108001005020618006162670280000800102670726707267072670726707
800242670620003625800108001080010472059014923626026706267061666531668480010800202400202670666118002110910800108001005020618006162670280000800102670726707267072670726707
8002426706200020725800108001080010472059014923626026706267061666531668480010800202400202670666118002110910800108001005020618006162670280000800102670726707267072670726707