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

Test 1: uops

Code:

  sub w0, w0, w1, uxtw
  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)ec? int retires (ef)f5f6f7f8fd
100410358010386225100010001000169160103510357283868100010002000103541111001100000731411193710000100010361036103610361036
10041035896186225100010001000169160103510357283868100010002000103541111001100013741411193710000100010361036103610361036
10041035807186225100010001000169160103510357283868100010002000103541111001100000731411193710000100010361036103610361036
100410358016786225100010001000169160103510357283868100010002000103541111001100000731411193710000100010361036103610361036
10041035806186225100010001000169160103510357283868100010002000103541111001100000731411193710000100010361036103610361036
100410358019886225100010001000169160103510357283868100010002000103541111001100000731411193710000100010361036103610361036
10041035806886225100010001000169160103510357283868100010002000103541111001100000731411193710000100010361036103610361036
10041035806186225100010001000169160103510357283868100010002000103541111001100000731411193710000100010361036103610361036
10041035807586225100010001000169160103510357283868100010002000103541111001100000731411193710000100010361036103610361036
10041035806186225100010001000169160103510357283868100010002000103541111001100000731411193710000100010361036103610361036

Test 2: Latency 1->2

Code:

  sub w0, w0, w1, uxtw
  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)033f4d51schedule 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
1020410035751499877251010010100101008866449695510035100358580387221010010200202001003541111020110099100101001000071023722994110000101001003610036100361003610036
102041003575619877251010010100101008866449695510035100358580387221010010200202001003541111020110099100101001000071023722994110000101001003610036100361003610036
102041003575619877251010010100101008866449695510035100358580387221010010200202001003541111020110099100101001006071023722994110000101001003610036100361003610036
1020410035751899877251010010100101008866449695510035100358580387221010010200202001003541111020110099100101001000071023722994110000101001003610036100361003610036
102041003575849877251010010100101008866449695510035100358580387221010010200202001003541111020110099100101001000071023722994110000101001003610036100361003610036
1020410035751519877251010010100101008866449695510035100358580387221010010200202001003541111020110099100101001000071023722994110000101001003610036100361003610036
1020410035758619877251010010100101008866449695510035100358580387221010010200202001003541111020110099100101001009371023722994110000101001003610036100361003610036
102041003575619877251010010100101008866449695510035100358580387221010010200202001003541111020110099100101001000071023722994110000101001003610036100361003610036
102041003575619877251010010100101008866449695510035100358580387221010010200202001003541111020110099100101001002371023722994110000101001003610036100361003610036
102041003575619877251010010100101008866449695510035100358580387221010010200202001003541111020110099100101001000071023722994110000101001003610036100361003610036

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 tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
1002410035750619863251001010010100108878449695510035100358602387401001010020200201003541111002110910100101000000064034133994010000100101003610036100361003610036
10024100357504349863251001010010100108878449695510035100358602387401001010020200201003541111002110910100101000000064034133994010000100101003610036100361003610036
1002410035750619863251001010010100108878449695510035100358602387401001010020200201003541111002110910100101000000064034133994010000100101003610036100361003610036
1002410035750619863251001010010100108878449695510035100358602387401001010020200201003541111002110910100101000000064034133994010000100101003610036100361003610036
1002410035750619863251001010010100108878449695510035100358602387401001010020200201003541111002110910100101000000664034133994010000100101003610036100361003610036
1002410035750619863251001010010100108878449695510035100358602387401001010020200201003541111002110910100101000000064034133994010000100101003610036100361003610036
1002410035759619863251001010010100108878449695510035100358602387401001010020200201003541111002110910100101000000064034133994010000100101003610036100361003610036
1002410035750619863251001010010100108878449695510035100358602387401001010020200201003541111002110910100101000000064034133994010000100101003610036100361003610036
1002410035750619863251001010010100108878449695510035100358602387401001010020200201003541111002110910100101000000064034133994010000100101003610036100361003610036
1002410035750619863251001010010100108878449695510035100358602387401001010020200201003541111002110910100101000000064034133994010000100101003610036100361003610036

Test 3: Latency 1->3

Code:

  sub w0, w1, w0, uxtw
  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)030918191e3f4d51schedule 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)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
10204100357500001059877251010010100101008866404969551003510035858038722101001020020200100354111102011009910010100100071013711994110000101001003610036100361003610036
1020410035760000619877251010010100101008866414969551003510035858038722101001020020200100354111102011009910010100100071013711994110000101001003610036100361003610036
1020410035750000619877251010010100101008866404969551003510035858038722101001020020200100354111102011009910010100100071013711994110000101001003610036100361003610036
1020410035750000619877251010010100101008866404969551003510035858038722101001020020200100354111102011009910010100100171013711994110000101001003610036100361003610036
1020410035750000829877251010010100101008866404969551003510035858038722101001020020200100354111102011009910010100100071013711994110000101001003610036100361003610036
1020410035760000619877251010010100101008866404969551003510035858038722101001020020200100354111102011009910010100100071013711994110000101001003610036100361003610036
1020410128750000619877251010010100101008866404969551003510035858038722101001020020200100354111102011009910010100100071013711994110000101001003610036100361003610036
1020410035750000619877251010010100101008866414969551003510035858038722101001020020200100354111102011009910010100100071013711994110000101001003610036100361003610036
10204100357500001479877251010010100101008866414969551003510035858038722101001020020200100354111102011009910010100100071013711994110000101001003610036100361003610036
10204100357500001039877251010010100101008866414969551003510035858038722101001020020200100354111102011009910010100100071013711994110000101001003610036100361003610036

1000 unrolls and 10 iterations

Result (median cycles for code): 1.0035

retire uop (01)cycle (02)03183f4d51schedule 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
100241003575061986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010101064034122994010000100101003610036100361003610036
100241003575061986325100101001010010887844969551003510035860288740100101002020020100354111100211091010010100064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010100064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010100064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010100064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010100664024122994010000100101003610036100361003610036
100241003575061986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010100364024122994010000100101003610036100361003610036
100241003575082986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010100064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010100064024122994010000100101003610036100361003610036
100241003575061986325100101001010010887844969551003510035860238740100101002020020100354111100211091010010100064024122994010000100101003610036100361003610036

Test 4: throughput

Count: 8

Code:

  sub w0, w8, w9, uxtw
  sub w1, w8, w9, uxtw
  sub w2, w8, w9, uxtw
  sub w3, w8, w9, uxtw
  sub w4, w8, w9, uxtw
  sub w5, w8, w9, uxtw
  sub w6, w8, w9, uxtw
  sub w7, w8, w9, uxtw
  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)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 tlb miss (a1)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
802041341910001422580100801008010040050014910306133861338633233334180100802001602001338639118020110099100801001000005110319111338380000801001338713387133871338713387
80204133861000352580100801008010040050004910306133861338633233334180100802001602001338639118020110099100801001000005110119111338380000801001338713387133871338713387
80204133861000352580100801008010040050004910306133861338633233334180100802001602001338639118020110099100801001002005110119111338380000801001338713387133871338713387
80204133861000352580100801008010040050014910306133861338633233334180100802001602001338639118020110099100801001000005110119111338380000801001338713387133871338713387
802041338610001192580100801008010040050014910306133861338633233334180100802001602001338639118020110099100801001000005110119111338380000801001338713387133871338713387
80204133861000562580100801008010040050014910306133861338633233334180100802001602001338639118020110099100801001000005110119111338380000801001338713387133871338713387
80204133861000352580100801008010040050014910306133861338633233334180100802001602001338639118020110099100801001000065110119111338380000801001338713387133871338713387
80204133861000352580100801008010040050014910306133861338633233334180100802001602001338639118020110099100801001000005110119111338380000801001338713387133871338713387
80204133861000352580100801008010040050014910306133861338633233334180100802001602001338639118020110099100801001000005110119111338380000801001338713387133871338713387
80204133861000352580100801008010040050014910306133861338633233334180100802001602001338639118020110099100801001000005110119111338380000801001338713387133871338713387

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)l2 tlb miss instruction (0a)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 miss (a1)ld unit uop (a6)l1d cache writeback (a8)a9acc2cfl1i cache miss demand (d3)d5map dispatch bubble (d6)dbddfetch restart (de)e0? int output thing (e9)? int retires (ef)f5f6f7f8fd
800241357210221003340526475212480403803968053440582614910519136031355533311834058040480423160828136033941800211091080010100000181805080016930551351980516800101355813602135561355113556
800241357010221013353126476712180399804058041640850014910540134311357033322134058041580560160020136203941800211091080010100020136605080059608131351480517800101355613556135711355513612
80024135531020000124082646795880397805318054940637614910478135591355433312133698041680424160830135583941800211091080010100210136325087010950951351680512800101361513556135551337213553
800241355410121203426735276913180401805248027240758714910473136181361433341834058041680557161066135683951800211091080010102212138045084059407101355480387800101355513494135701355713674
80024136141020011136603529761528052980010805534071011491053413616136183332263423805548066916027813614395180021109108001010201218352507906970491351980128800101337213569136031355813372
8002413371101200133396883512480406800108055240436014910534135541357333291534228053980429160020135533941800211091080010100200157045043079406101351880519800101355913372134351355413561
80024135541012001034082645625800108001080010400050149102911337113371333033348800108002016002013371391180021109108001010001000502404190331336880000800101337213372133721337213372
80024133711000000000035258001080010800104000501491029113371133713330333488001080020160020133713911800211091080010100000005021012190651336880000800101337213372133721337213372
8002413371100000000003525800108001080010400050149102911337113371333033348800108002016002013371391180021109108001010000000502209190941336880000800101337213372133721337213372
80024133711000000000011925800108001080010400050149102911337113371333033348800108002016002013371391180021109108001010000000502403190451336880000800101337213372133721337213372