Apple M1 Microarchitecture Research by Dougall Johnson

Firestorm: Overview | Base Instructions | SIMD and FP Instructions
Icestorm:  Overview | Base Instructions | SIMD and FP Instructions

SSRA (vector, 2S)

Test 1: uops

Code:

  ssra v0.2s, v1.2s, #3
  movi v0.16b, 1
  movi v1.16b, 2

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 0.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 1.000

retire (01)cycle (02)031e3f4e51inst issue (52)~issue fp/simd (54)~dispatch fp/simd (57)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op fp/simd (7e)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst neon or fp (9a)accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10043037230612548251000100010003983130301830373037241532895100010002000303730371110011000073116112630100030383038303830383038
10043037220612548251000100010003983130301830373037241532895100010002000303730371110011000673116112630100030383038303830383038
10043037230612548251000100010003983130301830373037241532895100010002000303730371110011000073116112630100030383038303830383038
100430372206125482510001000100039831303018303730372415328951000100020003037303711100110001273116112630100030383038303830383038
100430372306125482510001000100039831303018303730372415328951000100020003037303711100110001273116112630100030383038303830383038
10043037230612548251000100010003983130301830373037241532895100010002000303730371110011000073116112630100030383038303830383038
10043037230612548251000100010003983131301830373037241532895100010002000303730371110011000073116112630100030383038303830383038
10043037230612548251000100010003983130301830373037241532895100010002000303730371110011000073116112630100030383038303830383038
10043037220612548251000100010003983130301830373037241532895100010002000303730371110011000073116112630100030383038303830383038
10043037230612548251000100010003983130301830373037241532895100010002000303730371110011000073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  ssra v0.2s, v1.2s, #3
  movi v0.16b, 1
  movi v1.16b, 2

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)030b18191e3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225100061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
1020430037225000061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830230300383003830038
1020430037225000061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000037101161129634100001003003830038300383003830038
1020430037225000061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
1020430037225000061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
10204300372240000251295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
1020430037225000061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830181300383003830038
1020430037225000061295482510100100100001001014950042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
1020430037225000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
1020430037225000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03080b18191e1f3a3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a1a8a9acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037225000000161295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000001020640316332963010000103003830038300383003830038
100243003722500000006129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000270640316332963010000103003830038300383003830038
10024300372250000000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000060640316332963010000103003830038300383003830038
100243003722500000006129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000780640316332963010000103003830038300383003830038
100243003722500000006129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000960640316332963010000103003830038300383003830038
100243003722500000006129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000240640316332963010000103003830038300383003830038
100243003722500000006129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000300640316332963010000103003830038300383003830038
100243003722500000006129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000210640316332963010000103003830038300383003830038
100243003722500000006129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000750640316332963010000103003830038300383003830038
100243003722500000006129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000240640316332963010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  ssra v0.2s, v0.2s, #3
  movi v0.16b, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)030b1e3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)72scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa8c5branch mispredict (cb)cdcfd6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225006129547251010010010000100100005004277160030018300373003728271062874010100200100082002001630037300371110201100991001001000010001117171600296450100001003003830038300383003830038
1020430037225006129547251010010010000100100005004277160030018300373003728271062874110100200100082002001630037300371110201100991001001000010001117181600296450100001003003830038300383003830038
1020430037225006129547251010010010000100100005004277160030018300373003728271072874110100200100082002001630037300371110201100991001001000010001117171600296450100001003003830038300383003830038
1020430037225006129547251010010010000100100005004277160030018300373003728271072874010100200100082002001630037300371110201100991001001000010001117171600296450100001003003830038300383003830038
10204300372250156129547251010010010000100100005004277160030018300373003728271072874110100200100082002001630037300371110201100991001001000010001117181600296460100001003003830038300383003830038
1020430037225006129547251010010010000100100005004277160030018300373003728271072874010100200100082002001630037300371110201100991001001000010001117181600296450100001003003830038300383003830038
1020430037225006129547251010010010000100100005004277160030018300373003728271072874010100200100082002001630037300371110201100991001001000010001117171600296460100001003003830038300383003830038
1020430037225006129547251010010010000100100005004277160030018300373003728271062874010100200100082002001630037300371110201100991001001000010001117181600296450100001003003830038300383003830038
1020430037224006129547251010010010000100100005004277160030018300373003728271062874110100200100082002001630037300371110201100991001001000010001117181600296460100001003003830038300383003830038
1020430037225006129547251010010010000100100005004277160030018300373003728271072874010100200100082002001630037300371110201100991001001000010001117171600296460100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)031e3f4e51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722506129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000642216222962910000103003830038300383003830038
100243003722436129547251001010100001010000504277160300183003730037282863287671001020100002020000300373008411100211091010100001000640216222962910000103003830038300383003830038
100243003722406129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001023640216222962910000103003830038300383003830038
100243003722508429547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000640216662962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001010640216222970110000103003830038300383003830038
100243003722506129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000640216672962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000640216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  ssra v0.2s, v8.2s, #3
  movi v1.16b, 0
  ssra v1.2s, v8.2s, #3
  movi v2.16b, 0
  ssra v2.2s, v8.2s, #3
  movi v3.16b, 0
  ssra v3.2s, v8.2s, #3
  movi v4.16b, 0
  ssra v4.2s, v8.2s, #3
  movi v5.16b, 0
  ssra v5.2s, v8.2s, #3
  movi v6.16b, 0
  ssra v6.2s, v8.2s, #3
  movi v7.16b, 0
  ssra v7.2s, v8.2s, #3
  movi v8.16b, 9

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)031e3f51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6escheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa8acc5branch mispredict (cb)cdcfd5d6inst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602042008815007125801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000111101191160201051600001002006620066200662006620066
1602042006515102925801161008001610080028500640196120045200652016761280128200800282001600562006520065111602011009910010016000010000111101190160200621600001002006620066200662006620066
1602042006515002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000111101190160200621600001002006620066200662006620066
1602042006515002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000111101190160200621600001002006620066200662006620066
1602042006515002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000111101190160200621600001002006620066200662006620066
1602042006515002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000111101190160200621600001002006620066200662006620066
160204200651500303325801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000111101190160200621600001002006620066200662006620066
1602042006515002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000111101190160200621600001002006620066200662006620066
16020420065150050425801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000111101190160200621600001002006620066200662006620066
1602042013215002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000111101190160200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03070a18191e3f51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)5f6061696d6escheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa8acc2cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0? int output thing (e9)eaec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16002420075156000001142780010108000010800005064000011520032200512005132280010208000020160000200512024311160021109101016000010000100301131322542296200570401160000102006120061200522005220061
160024200601500000045298001010800001080000506400001152003220060200513228001020800002016000020051202131116002110910101600001000010029115282521196200480402160000102006120061200612006120052
16002420060150000004529800101080000108000050640000015200322005120060322800102080000201600002006020190111600211091010160000100001003685153422288200570402160000102005220052200612006120061
160024200511510000051298001010800001080000506400001152003220051200513228001020800002016000020051202051116002110910101600001000010034841112521198200480201160000102005220052200522005220052
160024200511560000045278001010800001080000506400001152003220051200513228001020800002016000020051201991116002110910101600001000010028851132521177200480201160000102005220061200522005220052
160024200511500000051278001010800001080000506400000152004120051200513228001020800002016000020051202201116002110910101600001000010029851625211128200480202160000102005220061200612006120052
16002420051151000004527800101080000108000050640000115200322005120051322800102080000201600002005120199111600211091010160000100001003485172521178200480201160000102005220052200522005220052
160024200511500100045278001010800001080000506400001152003220051200513228001020800002016000020051202031116002110910101600001000410029851152541165200480401160000102005220052200522005220052
160024200511500000023927800101080000108000050640000115200322005120051322800102080000201600002005120217111600211091010160000100001003085152521185200480201160000102005220052200522005220052
16002420051151000004452780010108000010800005064000011520032200512005132280010208000020160000200512019411160021109101016000010000100328511325211117200480201160000102005220052200522005220052

Test 5: throughput

Count: 16

Code:

  ssra v0.2s, v16.2s, #3
  ssra v1.2s, v16.2s, #3
  ssra v2.2s, v16.2s, #3
  ssra v3.2s, v16.2s, #3
  ssra v4.2s, v16.2s, #3
  ssra v5.2s, v16.2s, #3
  ssra v6.2s, v16.2s, #3
  ssra v7.2s, v16.2s, #3
  ssra v8.2s, v16.2s, #3
  ssra v9.2s, v16.2s, #3
  ssra v10.2s, v16.2s, #3
  ssra v11.2s, v16.2s, #3
  ssra v12.2s, v16.2s, #3
  ssra v13.2s, v16.2s, #3
  ssra v14.2s, v16.2s, #3
  ssra v15.2s, v16.2s, #3
  movi v16.16b, 17

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)030708090b18191e1f3f51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a1a6a8a9acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16020440923304311116111200158429223451611731021615611021611255051292972140714408214087420101842034316193520416164620632350440923408661911602011009910010016000010000010001111012022422400451600001004004940049400494004940049
1602044004830000000000762716010010016000010016000050012800001400294004840048199716199941601002001600002003200004004840048111602011009910010016000010000010001111012022422400451600001004004940049400494004940049
16020440048300000000007627160100100160000100160000500128000014002940048400481997161999416010020016000020032000040048400481116020110099100100160000100010101201111012022422400451600001004004940049400494004940049
16020440048300000000001182716010010016000010016000050012800001400294004840048199716199941601002001600002003200004004840048111602011009910010016000010000030001111012022422400451600001004004940049400494004940049
1602044004830000000000762716010010016000010016000050012800001400294004840048199716199941601002001600002003200004004840048111602011009910010016000010000010001111012022422400451600001004004940049400494004940049
1602044004830000000000762716010010016000010016000050012800001400294004840048199716199941601002001600002003200004004840048111602011009910010016000010000000001111012022422400451600001004004940049400494004940049
1602044004830000000000972716010010016000010016000050012800001400294004840048199716199941601002001600002003200004004840048111602011009910010016000010000040001111012022422400451600001004004940049400494004940049
16020440048299000000007627160100100160000100160000500128000014002940048400481997161999416010020016000020032000040048400481116020110099100100160000100000470301111012022422400451600001004004940049401124004940158
16020440154300000100120762716010010016000010016000050012800001400294004840048199716199941601002001600002003200004004840048111602011009910010016000010000040001111012022422400451600001004004940049400494004940049
16020440048300000000007627160100100160000100160000500128000014002940048400481997161999416010020016000020032000040048400481116020110099100100160000100000490301111012022422400451600001004004940049400494004940049

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03091e1f3f51inst issue (52)~issue int (53)~issue fp/simd (54)~dispatch int (56)~dispatch fp/simd (57)huge thing int (59)huge thing fp/simd (5b)5f60696d6edispatch stall (70)scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa0a1a8acc2cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1600244003930000046251600101016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000010022311201621111840036206160000104004040040401034004040040
16002440039300000462516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000002100223118162118940036206160000104004040040400404004040040
160024400993001004625160010101600001016000050128000011400204003940039199963200191600102016000020320000400394003911160021109101016000010000110601002231161621151040036206160000104004040040400404004040040
160024400393000004625160010101600001016000050128000011400204003940039199963200191600102016000020320000400394003911160021109101016000010000001002231181621151240036206160000104004040040400404004040040
160024400393000004625160010101600001016000050128000011400204003940039199963200191600102016000020320000400394003911160021109101016000010000001002231181621181640476206160000104004040040400404004040040
16002440039300000462516001010160000111600005012800001140020400394003920005320019160010201600002032000040039400391116002110910101600001000000100793115162115840036206160000104004040040400404004040040
1600244003930000046251600101016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000010022311916211141040036206160000104004040040400404004040040
160024400393000004625160010101600001016000050128000011400204003940039199963200191600102016000020320000400394003911160021109101016000010000001002231110162118840036206160000104004040040400404004040040
160024400392990008825160010101600001016000050128000011400204003940039199963200191600102016000020320000400394003911160021109101016000010000001002231191621114940036206160000104004040040400404004040040
160024400392990004625160010101600001016000050128000011400204003940039199963200191600102016000020320000400394003911160021109101016000010000001002231191621161340036206160000104004040040400404004040040