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

CSEL (32-bit)

Test 1: uops

Code:

  csel w0, w0, w1, 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)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100410358061917251000100010006225011035103580538821000100030001035104111001100010000073227119901000100010361036103610361036
100410358061917251000100010006225001035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
100410358061917251000100010006225011035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
100410358061917251000100010006225011035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
100410357061917251000100010006225001035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
100410358061917251000100010006225011035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
10041035801569172510001000100062250010351035805388210001000300010351041110011000100002773127119901000100010361036103610361036
100410358061917251000100010006225011035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
100410358082917251000100010006225001035103580538821000100030001035104111001100010000073127119901000100010361036103610361036
100410358061917251000100010006225011035103580538821000100030001035104111001100010000073127119901000100010361036103610361036

Test 2: Latency 1->2

Code:

  csel w0, w0, w1, 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)03091e3f4d51schedule 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 miss (a1)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102041003576001039920251010010100101006471524969551003510035865638732101001020030200100351021110201100991001010010100201871012721999210000101001003610036100361003610036
1020410035750082992025101001010010100647152496955100351003586563873210100102963020010035102111020110099100101001010000071012711999210000101001003610036100361003610081
10204100357510145992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001010002071012711999210000101001003610036100361003610036
10204100357501261992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
1020410035750061992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
1020410035750061992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
1020410035750061992025101001010010100647152496955100351003586683873210100102003020010035102111020110099100101001010001071012711999210000101001003610036100361003610036
1020410035750061992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
1020410035750061992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
10204100357500163992025101001010010100647152496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210023101001003610036100361003610036

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)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 cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10024100357506199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100064042733999310000100101003610036100361003610036
10024100357508299182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100101064032733999310000100101003610036100361003610036
10024100357506199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100064032733999310000100101003610036100361003610036
10024100357506199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100101064032733999310000100101003610036100361003610036
10024100357506199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100364032733999310000100101003610036100361003610036
10024100357506199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100064032733999310000100101003610036100361003610036
10024100357506199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100101064032733999310000100101003610036100361003610036
10024100357506199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100064032733999310000100101003610036100361003610036
10024100357506199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100064032733999310000100101003610036100361003610036
10024100357506199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100064032733999310000100101003610036100361003610036

Test 3: Latency 1->3

Code:

  csel w0, w1, 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)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 tlb miss (a1)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
102041003575252619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
102041003575213619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
102041003577961992025101001010010100647152049695510035100358656387321010010200302001003510211102011009910010100101000091571012711999210000101001003610036100361003610036
102041003575279619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
102041003575264619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
102041003575168619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
1020410035750619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010000071032711999210000101001003610036100361003610036
1020410035756619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
10204100357501479920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036
102041003575282619920251010010100101006471520496955100351003586563873210100102003020010035102111020110099100101001010000071012711999210000101001003610036100361003610036

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)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)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002410035750639918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010010000064022722999310000100101003610082100361003610036
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010010010664022722999310000100101003610036100361003610036
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010010030064022722999310000100101003610036100361003610036
10024100357503419918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010010000064022722999310000100101003610036100361003610036
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010010000064022722999310000100101003610036100361003610036
10024100357506199182510010100101001064724649695510035100358678387541001010020300201003510411100211091010010100100210064022722999310000100101003610036100361003610036
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010010000064022722999310000100101003610036100361003610036
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010010000064022722999310000100101003610036100361003610036
10024100357504119918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010010010064022722999310000100101003610036100361003610036
1002410035750619918251001010010100106472464969551003510035867838754100101002030020100351041110021109101001010010000064022722999310000100101003610036100361003610036

Test 4: Latency 1->4

Chain cycles: 1

Code:

  csel w0, w1, w2, 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)03l2 tlb miss data (0b)1e3f4d51schedule 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 cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
2020420035150002541992625202002020020200129765004916955200352003517406317481202002020040200200351041120201100992010010000131310128111999220100101002003620036200362003620036
2020420035150007261992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000001310128111999220100101002003620036200362003620036
2020420035150001491992625202002020020200129765004916955200352003517406317481202002020040200200351041120201100992010010000101310128111999220100101002003620036200362003620036
202042003515000821992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000001310128111999220100101002003620036200362003620036
20204200351500204611992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000001310128111999220100101002003620036200362003620036
202042003515000611992625202002020020200129765004916955200352003517406317481202002020040200200351041120201100992010010000001310128111999220100101002003620036200362003620036
2020420035150001701992625202002020020200129765004916955200352003517406317481202002020040200200351041120201100992010010000001310128111999220100101002003620036200362003620036
202042003515000611992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000001310128111999220100101002003620036200362003620036
202042003515000611992625202002020020200129765004916955200352003517406317481202002020040200200351041120201100992010010000101310128111999220100101002003620036200362003620036
202042003515000611992625202002020020200129765014916955200352003517406317481202002020040200200351041120201100992010010000001310128111999220100101002003620036200362003620036

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)033f4d51schedule 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 int alu (97)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
200242003515061199182520020200202002012972971491695502003520035174283175042002020020400202003510411200211092001010000001270127111999520010100102003620036200362003620036
200242003515061199182520020200202002012972971491695502003520035174283175042002020020400202003510411200211092001010000001270127131999520010100102003620036200362003620036
200242003515061199182520020200202002012972971491695502003520035174283175042002020020400202003510411200211092001010000001270127151999520010100102003620036200362003620036
200242003515061199182520020200202002012972971491695502003520035174283175042002020020400202003510411200211092001010000001270127131999520010100102008220036200822008220036
200242003515061199182520020200202002012972971491695502003520035174283175042002020020400202003510411200211092001010000001270127111999520010100102003620036200362003620036
200242003515061199182520020200202002012972971491695502003520035174283175042002020020400202003510411200211092001010000001270127131999520010100102003620036200362003620036
200242003515061199182520020200202002012972971491695502003520035174283175042002020020400202003510411200211092001010000001270127111999520010100102003620036200362003620036
200242003515061199182520020200202002012972971491695502003520035174283175042002020020400202003510411200211092001010000001270127211999520010100102003620036200362003620036
200242003515061199182520020200202002012972971491695502003520035174283175042002020020400202003510411200211092001010000001270127111999520010100102003620036200362003620036
200242003515061199182520020200202002012972971491695502003520035174283175042002020020400202003510411200211092001010000001270127131999520010100102003620036200362003620036

Test 5: throughput

Count: 8

Code:

  csel w0, w8, w9, hi
  csel w1, w8, w9, hi
  csel w2, w8, w9, hi
  csel w3, w8, w9, hi
  csel w4, w8, w9, hi
  csel w5, w8, w9, hi
  csel w6, w8, w9, hi
  csel w7, w8, w9, hi
  mov x8, 9
  mov x9, 10

(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)acc2cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8020426787201036258010080100801004797991492365626736267361667231669180100802002404222673666418020110099100801008010000005110219112673280000801002673726737267372673726737
8020426736200036258010080100801004797991492381726736267361667231669180100802002402002673666118020110099100801008010000005110119112673280000801002673726737267372673726737
8020426736200036258010080100801004797991492365626736267361667231669180100802002402002673666118020110099100801008010000005110119112673280000801002673726737267372673726737
8020426736200036898010080100801004797991492365626736267361667231669180100802002402002673666118020110099100801008010000005110119112673280000801002673726737267372673726737
8020426736200036258010080100801004797991492365626736267361667231669180100802002402002673666118020110099100801008010011621205110119112673280000801002673726737267372673726737
8020426736200036258010080100801004797991492365626736267361667231669180100802002402002673666118020110099100801008010000005110119112673380000801002673726737267372673726737
8020426736200036258010080100801004797991492365626736267361667231669180100802002402002673666118020110099100801008010000005110119112673280000801002673726737267372673726737
8020426736200036258010080100801004797991492365626736267361667231669180100802002402002673666118020110099100801008010000005110119112673280000801002673726737267372673726737
8020426736200036258010080100801004797991492365626736267361667231669180100802002402002673666118020110099100801008010000005110119112673280000801002673726737267372673726737
8020426736200036258010080100801004797991492365626736267361667231669180100802002402002673666118020110099100801008010000005110119112673280000801002673726737267372673726737

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f3a3f51schedule 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 tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acbbcfd0d2d5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8002426723200100100015027842580010800108001047205900492362626706267061666531668480010800202400202670666118002110910800108001000000000502400191813162670280000800102670726707267072670726707
80024267062001001000002432580010800108001047205910492362626706267061666531668480010800202400202670666118002110910800108001000000000502400171813132670280000800102670726707267072670726707
800242670620010010000021522580010800108001047205910492362626706267061666531668480010800202400202670666118002110910800108001000000000502400161818182670280067800102670726707267072670726707
800242670620010010000025932580010800108001047205910492362626706267061666531668480010800202400202670666118002110910800108001000000000502400181816172670280000800102670726707267072670726707
80024267062001001000002852580010800108001047205910492362626706267061666531668480010800202400202670666118002110910800108001000000000502400151817152670280000800102670726707267072670726707
800242670620010010000021292580010800108001047205910492362626706267061666531668480010800202400202670666118002110910800108001000000000502400161814142670280000800102670726707267072670726707
80024267062001001000002642580010800108001047205910492362626706267061666531668480010800202400202670666118002110910800108001000000000502400161813182670280000800102670726707267072670726707
80024267062001001000002432580010800108001047205910492362626706267061666531668480010800202400202670666118002110910800108001000000000502400151815132670280202800102670726707267072670726707
800242670620010010000026842580010800108001047205910492362626706267061666531668480010800202400202670666118002110910800108001000000000502400161815152670280000800102670726707267072670726707
80024267062001001000002852580010800108001047205910492362626706267061666531668480010800202400202670666118002110910800108001000000000502400171816202670280000800102670726707267072670726707