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

SUB (sxtw, 32-bit)

Test 1: uops

Code:

  sub w0, 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)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)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
100410358243318622510001000100016916010351035728386810001000200010354121100110000073145119371000100010821036103610361036
10041035801038622510001000100016916010351035728386810001000200010354111100110000073141119371000100010361036103610361036
1004103580618622510001000100016916010351035728386810001000200010354111100110000073141119371000100010361036103610361036
1004103580618622510001000100016916010351035728386810001000200010354111100110000073141119371000100010361036103610361036
1004103580618622510001000100016916010351035728386810001000200010354111100110001073141119371000100010361036103610361036
10041035801018622510001000100016916010351035728386810001000200010354111100110000073141119371000100010361036103610361036
1004103580618622510001000100016916010351035728386811531000200010354111100110000073141119371000100010361036103610361036
10041035801278622510001000100016916010351035728386810001000200010354111100110000073141119371000100010361036103610361036
1004103580618622510001000100016916010351035728386810001000200010354111100110000073141119371000100010361036103610361036
1004103580618622510001000100016916010351035728386810001000200010354111100110000073141119531000100010361036103610361036

Test 2: Latency 1->2

Code:

  sub w0, w0, w1, sxtw
  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)03181e3f4d51schedule 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)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020410035750061987725101001010010100886641496955010035100358580387221010010200202001003541111020110099100101001000071013711994110000101001003610036100361003610036
10204100357500619877251010010100101008866414969550100351003585803872210100102002020010035411110201100991001010010027071013711994110000101001003610036100361003610036
10204100357500619877251010010100101008866414969550100351003585803872210100102002020010035411110201100991001010010010371023711994110000101001003610036100361003610036
1020410035750061987725101001010010100886641496955010035100358580387221010010200202001003541111020110099100101001002071013711994110000101001003610036100361003610036
10204100357500619877251010010100101008866414969550100351003585803872210100102002020010035411110201100991001010010025371013711994110000101001003610036100361003610036
1020410035750361987725101001010010100886641496955010035100358580387221010010200202001003541111020110099100101001000071013711994110000101001003610036100361003610036
1020410035820061987725101001010010100886641496955010035100358580387221010010200202001003541111020110099100101001000071013711994110000101001003610036100361003610036
10204100357512461987725101001010010100886641496955010035100358580387221010010200202001003541111020110099100101001000071013711994110000101001003610036100361003610036
1020410035750061987725101001010010100886641496955010035100358580387221010010200202001003541111020110099100101001000071013711994110000101001003610036100361003610036
1020410035750661987725101001010010100886641496955010035100358580387221010010200202001003541111020110099100101001000071013711994110000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)0309181e3f4d51schedule 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
10024100357500061986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010100064034133994010000100101003610036100361003610036
10024100357600061986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010100064034133994010000100101003610036100361003610036
10024100357500061986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010100064034133994010000100101003610036100361003610036
10024100357500061986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010100064034133994010000100101003610036100361003610036
10024100357500061986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010100964034133994010000100101003610036100361003610036
10024100357500061986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010100064034133994010000100101003610036100361003610036
10024100357500061986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010100964034133994010000100101003610036100361003610036
10024100357500061986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010100064034133994010000100101003610036100361003610036
10024100357500061986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010100064034133994010000100101003610036100361003610036
100241003575000619863251001010010100108878449695510035100358602387401001010020200201003541111002110910100101008464034133994010000100101003610036100361003610036

Test 3: Latency 1->3

Code:

  sub w0, w1, w0, sxtw
  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)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 branch cond (94)inst int alu (97)9fl1d cache writeback (a8)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1020410035750061987725101001010010100886641496955100351003585803872210100102002020010035411110201100991001010010003071033722994110000101001003610036100361003610036
1020410035750961987725101001010010100886641496955100351003585803872210100102002020010035411110201100991001010010016071023722994110000101001003610036100361003610036
1020410035750061987725101001010010100886641496955100351003585803872210100102002020010035411110201100991001010010030071023722994110000101001003610036100361003610036
1020410035750264849877251010010100101008866414969551008010035858038722101001020020200100354111102011009910010100100163071023722994110000101001003610036100361003610036
10204100357500829877251010010100101008866414969551003510035858038722101001020020200100354111102011009910010100100012071023722994110000101001003610036100361003610036
1020410035750061987725101001010010100886641496955100351003585803872210100102002020010035411110201100991001010010000071023722994110000101001003610036100361003610036
1020410035750061987725101001010010100886641496955100351003585803872210100102002020010035411110201100991001010010010071023722994110000101001003610036100361003610036
1020410035750061987725101001010010100886641496955100351003585803872210100102002020010035411110201100991001010010010071023722994110000101001003610036100361003610036
1020410035751061987725101001010010100886641496955100351003585803872210100102002020010035411110201100991001010010003071023722994110000101001003610036100361003610036
10204100357500619877251010010100101008866414969551003510035858038722101001020020200100354111102011009910010100100015071023722994110000101001003610036100361003610036

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)9fl1d 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
100241003575061986325100101001010010887840496955100351003586023874010010100202002010035411110021109101001010000064034122994010000100101003610036100361003610036
100241003575061986325100101001010010887840496955100351003586023874010010100202002010035411110021109101001010000064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887840496955100351003586023874010010100202002010035411110021109101001010000064024122994010000100101003610036100361003610036
1002410035751561986325100101001010010887840496955100351003586023874010010100202002010035411110021109101001010000064024122994010000100101003610036100361003610036
1002410035750619863251001010010100108878404969551003510035860238740100101002020020100354111100211091010010100001864024122994010000100101003610036100361003610036
100241003575061986325100101001010010887840496955100351003586023874010010100202002010035411110021109101001010000064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887840496955100351003586023874010010100202002010035411110021109101001010000064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887840496955100351003586023874010010100202002010035411110021109101001010000064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887840496955100351003586023874010010100202002010035411110021109101001010000064024122994010000100101003610036100361003610036
1002410035753361986325100101001010010887840496955100351003586023874010010100202002010035411110021109101001010000064024122994010000100101003610036100361003610036

Test 4: throughput

Count: 8

Code:

  sub w0, w8, w9, sxtw
  sub w1, w8, w9, sxtw
  sub w2, w8, w9, sxtw
  sub w3, w8, w9, sxtw
  sub w4, w8, w9, sxtw
  sub w5, w8, w9, sxtw
  sub w6, w8, w9, sxtw
  sub w7, w8, w9, sxtw
  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.1673

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3a3f51schedule 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)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
802041341910100000003525801008010080100400500149103061338613386332333341801008020016020013386391180201100991008010010010000005110319321338380000801001338713387133871338713387
802041338610100000003525801008010080100400500149103061338616090332333341801008020016020013386391180201100991008010010010000005110219221338380000801001338713387133871338713387
802041338610100000006025801008010080100400500149103061338613386332333341801008020016020013386391180201100991008010010000000005110219221338380000801001338713387133871338713387
802041338610000000003525801008010080100400500149103061338613386332333341801008020016020013386391180201100991008010010000000005110219221338380000801001338713387133871338713387
802041338610000000003525801008010080100400500149103061338613386332333341801008020016020013386391180201100991008010010040320005110219221338380000801001338713387133871338713387
802041338610100000003525801008010080100400500149103061338613386332333341801008020016020013386391180201100991008010010000000005110219221338380000801001338713387133871338713387
802041338610000000003525801008010080100400500149103061338613386332333341801008020016020013386391180201100991008010010000000005110219221338380000801001338713387133871338713387
802041338610000000003525801008010080100400500149103061338613386332333341801008020016020013386391180201100991008010010000000005111219431338380000801001338713387133871338713387
802041338610000000003525801008010080100400500149103061338613386332333341801008020016020013386391180201100991008010010000300005110219231338380000801001338713387133871338713387
802041338610000000003525801008010080100400500149103061338613386332333341801008020016020013386391180201100991008010010070000005110219221338380000801001338713387133871338713387

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)09l2 tlb miss data (0b)18191e1f3f51schedule 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 access (a0)l1d tlb miss (a1)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc2cfd0d2d5map dispatch bubble (d6)dbddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
8002413387100000000069258001080012800104000500149102911337113371333033348800108002016002013371391180021109108001010000042005021002190451336880000800101337213372133721337213379
8002413371101000000035258001080012800104000500049102911337113371333033348800108002016002013371391180021109108001010000000005021004190241336880000800101337213372133721337213379
8002413371100000000035258001080012800104000500049102911337113371333033348800108002016002013371391180021109108001010000000005021002190441336880000800101337213372133721337213379
80024133711000000000352580010800128001040005000491029113371133713330333488001080020160020133713911800211091080010100000290905020004190441336880000800101337213372133721337213379
8002413371100000000035258001080012800104000501149102911337113371333033348800108002016002013371391180021109108001010000000005021004190441336880000800101337213372133721337213379
8002413371100000000035258001080012800104000500049102911337113371333033348800108002016002013371391180021109108001010000000005021002190241336880000800101343313372133721337213379
8002413371100000000035258001080012800104000500049102911337113371333033348800108002016002013371391180021109108001010000000005021004190441336880000800101337213372133721337213379
8002413371100000000035258001080012800104000500049102911337113371333033348800108002016002013371391180021109108001010000000005021004190421336880000800101337213372133721337213379
8002413371100000000035258001080012800104000500049102911337113371333033348800108002016002013371391180021109108001010000000005021004190241336880000800101337213372133721337213379
8002413371100000000035258001080012800104000500049102911337113371333033348800108002016002013371391180021109108001010000000005023008190431336880000800101337213372133721337213379