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, 8B)

Test 1: uops

Code:

  ssra v0.8b, v1.8b, #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)03080b1e3f4e51inst issue (52)~issue fp/simd (54)~dispatch fp/simd (57)huge thing fp/simd (5b)696d6edispatch 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)a0a1a8acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004303723000612548251000100010003983133018303730372415328951000100020003037303711100110000000073116112630100030383038303830383038
10043037220001052548251000100010003983133018303730372415328951000100020003037303711100110000000073116112630100030383038303830383038
10043037230002472548251000100010003983133018303730372415328951000100020003037303711100110000000073116112630100030383038303830383038
1004303723000612548251000100010003983133018303730372415328951000100020003037303711100110000000073116112630100030383038303830383038
10043037230001032548251000100010003983133018303730372415328951000100020003037303711100110000000073116112630100030383038303830383038
10043037220001072548251000100010003983133018303730372415328951000100020003037303711100110000000073116112630100030383038303830383038
10043037230002082548251000100010003983133018303730372415328951000100020003037303711100110000000073116112630100030383038303830383038
10043037230006125482510001000100039831330183037303724153289510001000200030373037111001100000140073116112630100030853038303830383038
1004303723000612548251000100010003983133018303730372415328951000100020003037303711100110000000073116112630100030383038303830383038
1004303722000612548251000100010003983133018303730372415328951000100020003037303711100110000000073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  ssra v0.8b, v1.8b, #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)0308090b18191e1f3a3f4e51inst 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)cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722500000000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000000000071011611296340100001003003830038300383003830038
102043003722500000000612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000000071011611296340100001003003830038300383003830038
102043003722500000000612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000000071011611296340100001003003830038300383003830038
102043003722500000000612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000000071011611296340100001003003830038300383003830038
102043003722500000000612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000001071011611296340100001003003830038300383003830038
102043003722500000000612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000000071011611296340100001003003830038300383003830038
102043003722500000000612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000000071011611296340100001003003830038300383003830038
102043003722500000000612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000020000071011611296340100001003003830038300383003830038
102043003722500000000612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000000071011611296340100001003003830038300383003830038
102043003722500000000612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000000000071011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03091e1f3f4e51inst 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)9fa8acc2branch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250006129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000640316222963010000103003830038300383003830038
10024300372250008229548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000640216222963010000103003830038300383003830038
1002430037224001326129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000640216222963010000103003830038300383003830038
10024300372250006129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000640216222963010000103003830038300383003830038
10024300372250006129548441001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100000640216222963010000103003830038300383003830038
10024300372250006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100000640216222966810000103003830038300383003830038
10024300372250306129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100000640216222963010000103003830038300383003830038
10024300372250006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100000640216222963010000103003830038300383003830038
10024300372250006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100000640216222963010000103003830038300383003830038
10024300372240006129548251001010100001010000504277313030018300373003728287328767100102010000202000030037300371110021109101010000100000640216222963010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  ssra v0.8b, v0.8b, #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)030a18191e1f3a3f4e51inst 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)9fa0a1a8a9acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225000000612954725101001001000010010000500427716013001830037300372827172874110100200100082002001630037300371110201100991001001000010000600011171801600296450100001003003830038300383003830038
1020430037225000000612954725101001001000010010000500427716013001830037300372827162874010100200100082002001630037300371110201100991001001000010000000011171801600296450100001003003830038300383003830038
1020430037225000000612954725101001001000010010000500427716013001830037300372827172874010100200100082002001630037300371110201100991001001000010000000011171701600296450100001003003830038300383003830038
1020430037225000000612954725101001001000010010000500427716013001830037300372827162874010100200100082002001630037300371110201100991001001000010000300011171701600296450100001003003830038300383003830038
1020430037225000000612954725101001001000010010000500427716013001830037300372827172874110100200100082002001630037300371110201100991001001000010000023011172222422296290100001003003830038300383003830038
1020430037225000001972954725101001001000010010000500427716013001830037300372825262873310100200100002002000030037300371110201100991001001000010000400011172222422296290100001003003830038300383003830038
1020430037225000001972954725101001001000010010000500427716013001830037300372825262873310100200100002002000030037300371110201100991001001000010000100011172222422296290100001003003830038300383003830038
1020430037225000001972954725101001001000010010000500427716013001830037300372825262873310100200100002002000030037300371110201100991001001000010000000011172222422296290100001003003830038300383003830038
1020430037225000001972954725101001001000010010000500427716013001830037300372825262873310100200100002002000030037300371110201100991001001000010000000011172222422296290100001003003830038300383003830038
1020430037225000001972954725101001001000010010000500427716013001830037300372825262873310100200100002002000030037300371110201100991001001000010000000011172222422296290100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03083f4e51inst 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)9fa0a1a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722506129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
1002430037233014529547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003723306129547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
1002430037225015629547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
1002430037225072629547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
1002430037225072629547251001010100001010000504277160130018300373003728286328767100102010000202000030037300371110021109101010000100100640216222962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  ssra v0.8b, v8.8b, #3
  movi v1.16b, 0
  ssra v1.8b, v8.8b, #3
  movi v2.16b, 0
  ssra v2.8b, v8.8b, #3
  movi v3.16b, 0
  ssra v3.8b, v8.8b, #3
  movi v4.16b, 0
  ssra v4.8b, v8.8b, #3
  movi v5.16b, 0
  ssra v5.8b, v8.8b, #3
  movi v6.16b, 0
  ssra v6.8b, v8.8b, #3
  movi v7.16b, 0
  ssra v7.8b, v8.8b, #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)03081e3f51inst 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)696d6escheduler 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)9fa1a8acc5branch mispredict (cb)cdcfd6e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160204200911510029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000031111011916200621600001002006620066200662006620066
1602042006515000305258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
160204200651510029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000231111011916200621600001002006620066200662006620066
160204200651501029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
16020420065150001191258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401962004520065200656128012820080028200160056200652006511160201100991001001600001000031111011916200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)030708090a0b18191e1f3f51inst 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)9fa0a1a6a7a8a9acc2cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0? int output thing (e9)eaebec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160024200861500000000003072780010108000010800005064000011520032200512005132280010208000020160000200512005111160021109101016000010200000001003111225252217420048029301160000102005220052200522005220052
16002420051150000000000452780010108000010800005064000011520032200602005135080010208000020160000200602005111160021109101016000010000000001002911216252118520048027001160000102005220052200522005220061
1600242005115000000000045298001010800001080000506400001152003220051200513228001020800002016000020051200601116002110910101600001000000030100288215252117820048024601160000102005220052200522005220052
1600242005115100000000045278001010800001080000506400001152003220051200513228001020800002016000020051200511116002110910101600001000000030100318217252118720048026901160000102005220052200522005220052
1600242005115000000000045278001010800001080000506400000152004120060200603228001020800002016000020051200511116002110910101600001000000000100318215252114520048025501160000102005220052200522005220052
16002420051150000000000452780010108000010800005064000011520032200512005132280010208000020160000200512005111160021109101016000010000010001002711227252113520048024701160000102005220052200522005220052
16002420051150000000000662780010108000010800005064000011520032200512005132280010208000020160000200512005111160021109101016000010000000301015082151872118420375027602160000102053420572205352048220455
16002420458153001005567288118526780560108021210806305064418411520421205442061645149801162080525201612582053320533111600211091010160000100420003440410196821715522187204480268201160000102061320559206082028920534
16002420536154010006680152845278001010800001080000506400001152003220060200603228001020800002016000020051200511116002110910101600001000001000100338216342118720057025701160000102005220052200522005220052
16002420051150000010067226411352488053310805271080730506450641152048620772207766314580220208084320161048207692069991160021109101016000010400200371321024382182632118720578025701160000102064120761207792062820694

Test 5: throughput

Count: 16

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)03080b18191e1f3f51inst 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)9fa6a8a9acc2c5branch mispredict (cb)cdcfd0d5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602044006130000000030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000000011110118021613400361600001004004040040400404004040040
1602044003929900000030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000000011110118011611400361600001004004040040400404004040040
1602044003930000000030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000000011110118011611400361600001004004040040400404004040040
1602044003930000000030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000003011110118011612400361600001004004040040400404004040040
1602044003930000000030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000000011110118021611400731600001004004040040400404004040040
1602044003930000000030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000000011110118021612400361600001004004040040400404004040040
1602044003930000000030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000000011110118011621400361600001004004040040400404004040040
16020440039300000024030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000000011110118021612400361600001004004040040400404004040040
1602044003930000000030251601081001600081001600205001280132140020400394003919977619990160120200160237200320064400394003911160201100991001001600001000000011110118031622400361600001004004040040400404004040040
16020440039300000000125251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000000011110118011621400361600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03080b181e1f3f51inst 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)5f6061696d6edispatch 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)9fa0a1a8accfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1600244003930000030462516010910160000101600005012800001110400204003940039199963200191600102016000020320000400394003911160021109101016000010000010022133124162261231740036155160000104004040040400404004040040
1600244003929900000462516001010160000101600005012800000010400204003940039199963200191600102016000020320000400394003911160021109101016000010000610022131118164301242440036155160000104004040040400404004040040
1600244003930000000462516001010160000101603145012800001010400204003940039199963200191600102016000020320000400394003911160021109101016000010000010022135122162301222440085155160000104004040040400404004040040
160024400392990000046251600101016000010160000501280000101040020401004003919996320019160010201600002032000040039402411116002110910101600001000001002235122162291232340036155160000104004040040400404004040040
16002440039300004004625160010101600001016000050128000011104002040039400391999632001916001020160000203200004003940039111600211091010160000100000100221351231622912322400361510160000104004040040400404004040040
16002440039300000561052251600101016000010160000501280000111040020400394003919996320019160010201600002032000040039400391116002110910101600001000001002235123162201222240036155160000104004040040400404004040040
160024400392990001208825160010101600001016000050128000011104002040039400391999632001916001020160000203200004003940039111600211091010160000100001810024165122602231232340036155160000104004040040400404004040040
1600244003930000039176462516001010160000101600005012800000110400204003940039199963200191600102016000020320000400394003911160021109101016000010000010022135122164311222240036155160000104004040040400404004040040
1600244003930000000462516001010160000101600005012800001110400204003940039199963200191600102016000020320000400394003911160021109101016000010002010022135123162291252340036155160000104004040040400404004040040
160024400393000000046251600101016038910160000501280000110400204003940039199963200191600102016000020320000400394003911160021109101016000010000010022135123162221222240036155160000104004040040400404004040040