Apple M1 Microarchitecture Research by Dougall Johnson

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

URSRA (vector, 16B)

Test 1: uops

Code:

  ursra v0.16b, v1.16b, #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)0307090a18191e3a3f4e51inst 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)a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10043037231010002682548251000100010003983133018303730372415328951000100020003037303711100110000077616442630100030383038303830383038
10043037231010002682548251000100010003983133018303730372415328951000100020003037303711100110000077416442630100030383038303830383038
10043037231010002682548251000100010003983133018303730372415328951000100020003037303711100110000077416442630100030383038303830383038
100430372210100022082548251000100010003983133018303730372415328951000100020003037303711100110000077416442630100030383038303830383038
100430372310111022632548251000100010003983133018303730372415328951000100020003037303711100110000077416442630100030383038303830383038
100430372210100022202548251000100010003983133018303730372415328951000100020003037303711100110000077416442630100030383038303830383038
100430372211100022982548251000100010003983133018303730372419328951000100020003037303711100110000077416442630100030383038303830843038
1004303723111001221102548251000100010003983133018303730372415328951000100020003037303711100110000077416442630100030383038303830383038
100430372310100023022548251000100010003983133018303730372415328951000100020003037303711100110000077416442630100030383038303830383038
10043037231010002912548251000100010003983133018303730372415328951000100020003037303711100110002377416442630100030383038303830383038

Test 2: Latency 1->1

Code:

  ursra v0.16b, v1.16b, #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)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)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)9fa8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1020430037225019829548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
102043003722506129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
102043003722506129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
102043003722506129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
102043003722406129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
102043003722506129548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
102043003722506129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
102043003722506129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038
102043003722506129548451013212510000100100005284277313130054300373008428265328780101002001016120020000300843008511102011009910010010000100107401161129634100001003003830038300383003830038
102043003722506129548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100007101161129634100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03191e3f4e51inst 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)9fa6a8a9acbranch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722500612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830081300383003830038
100243003722400612954825100101010000101014950427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038
100243003722500612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038
100243003722500612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038
100243003722500612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038
100243003722500612954825100201010000101000050427731303001830037300372828732876710010201000020200003003730037411002110910101000010000006402162229630010000103003830038300383003830038
100243003722500612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038
1002430037225003462954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038
100243003722500612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038
100243003722500612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000006402162229630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  ursra v0.16b, v0.16b, #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)030408090b18191e1f3a3f4e51inst 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? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722500000000044129547251010010010000100100005004277160030018300373003728287628733101002001000020020000300373003711102011009910010010000100000000011172222422296290100001003003830038300383003830038
10204300372240000000009729547251010010010000100100005004277160030018300373003728252628733101002001000020020000300373003711102011009910010010000100000000011172222422296290100001003003830038300383003830038
102043003722500000000197295472510100100100001001000050042771600300183003730037282526287331010020010000200200003003730037111020110099100100100001000000015011171801600296450100001003003830038300853003830038
10204300372250100000006129547251010010010000100100005004277160030018300373003728271728740101002001000820020362300373003711102011009910010010000100000000011171801600296450100001003003830038300383003830038
102043003722500000000061295472510100100100001001000050042771600300183003730037282717287411010020010008200200163003730037111020110099100100100001000000096011171801600296460100001003003830038300383003830038
1020430037225000000000612954725101001001000010010000500427716003001830037300372827162874010100200100082002001630037300371110201100991001001000010000000114011171701600296460100001003003830038300383003830038
1020430037225000000000612954725101001001000010010000500427716003001830037300372827172874010100200100082002001630037300371110201100991001001000010000000117011171701600296460100001003003830038300383003830038
1020430037225000000000612954725101001001000010010000500427716003001830037300372827162874010100200100082002001630037300371110201100991001001000010000000114011171701600296450100001003003830038300383003830038
102043003722500000000061295472510100100100001001000050042771600300183003730037282716287401010020010008200200163003730037111020110099100100100001000008200011171801600296450100001003003830038300383003830038
102043003722501000000061295472510100100100001001000050042771600300183003730037282716287401010020010008200200163003730037111020110099100100100001000000090011171701600296450100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)030b0e191e3a3f4e51inst 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)9fa6a8a9acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250000061295472510010121000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383003830038
10024300372250009061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383003830038
10024300372250000061295472510010101000010100005042771600301623003730037282863287671001020100002020000300373003711100211091010100001000000661216222962910000103003830038300383003830038
10024300372250000061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383003830038
10024300372250000061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383003830038
10024300372250000061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383008630038
10024300372250000061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383003830038
10024300372250000061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383003830038
10024300372250000061295472510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383003830038
10024300372250000061295474510010101000010100005042771600300183003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  ursra v0.16b, v8.16b, #3
  movi v1.16b, 0
  ursra v1.16b, v8.16b, #3
  movi v2.16b, 0
  ursra v2.16b, v8.16b, #3
  movi v3.16b, 0
  ursra v3.16b, v8.16b, #3
  movi v4.16b, 0
  ursra v4.16b, v8.16b, #3
  movi v5.16b, 0
  ursra v5.16b, v8.16b, #3
  movi v6.16b, 0
  ursra v6.16b, v8.16b, #3
  movi v7.16b, 0
  ursra v7.16b, v8.16b, #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)030b181e1f3f51inst 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)9fa8a9acc5branch mispredict (cb)cdcfd6inst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16020420088150000029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100420911110119160200621600001002006620066200662006620066
1602042006515100002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000011110119160200621600001002006620066200662006620066
1602042006515000002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000011110119160200621600001002006620066200662006620066
1602042006515000002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000011110119160200621600001002006620066200662006620066
16020420065151000029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100570311110119160200621600001002006620066200662006620066
16020420065150000029258011610080016100800285006401960200452006520310612801282008002820016005620065200651116020110099100100160000100760311110119160200621600001002006620066200662006620066
1602042006515100002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000011110119160200621600001002006620066200662006620066
1602042006515000002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000011110119160200621600001002006620066200662006620066
1602042006515000002925801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010000311110119160200621600001002006620066200662006620066
1602042006515100002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000311110119160200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)030b1e3f51inst 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)5f60696d6escheduler 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)9fa8accfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16002420064150005992580010108000010800005064000011200272004620046322800102080000201600002004620046111600211091010160000100310028311520211552004315160000102004720047200472004720250
1600242004615000452580010108000010800005064000011200272004620046322800102080000201600002004620046111600211091010160000100310030311520211752004315160000102004720047200472004720237
1600242004615000452580010108000010800005064000011200272004620046322800102080000201600002004620046111600211091010160000100010031311520211752004315160000102004720047200472004720214
16002420046150004525800101080000108000050640000112002720046200463228001020800002016000020046200461116002110910101600001001810030311820211452004315160000102004720047200472004720231
1600242004615000452580010108000010800005064000011200272020520046322800102080000201600002004620046111600211091010160000100010027311475211772004315160000102004720047200472004720220
16002420046150006152580010108000010800005064000011200272004620046322800102080000201600002004620046111600211091010160000100010031311720211552004315160000102004720047200472004720217
1600242004615000452580010108000010800005064000011200272004620046322800102080000201600002004620046111600211091010160000100010028311520211752004315160000102004720047200472004720221
16002420046150004525800101080000108000050640000112002720046200463228001020800002016000020046200461116002110910101600001055010028311520211552004315160000102004720047200472004720219
1600242004615000452580010108000010800005064000011200272004620046322800102080000201600002004620046111600211091010160000100010031311520211872004315160000102004720047200472004720216
16002420046150018452580010108000010800005064000011200272028720046322800102080000201600002004620046111600211091010160000100010028311820211552004315160000102004720047200472004720218

Test 5: throughput

Count: 16

Code:

  ursra v0.16b, v16.16b, #3
  ursra v1.16b, v16.16b, #3
  ursra v2.16b, v16.16b, #3
  ursra v3.16b, v16.16b, #3
  ursra v4.16b, v16.16b, #3
  ursra v5.16b, v16.16b, #3
  ursra v6.16b, v16.16b, #3
  ursra v7.16b, v16.16b, #3
  ursra v8.16b, v16.16b, #3
  ursra v9.16b, v16.16b, #3
  ursra v10.16b, v16.16b, #3
  ursra v11.16b, v16.16b, #3
  ursra v12.16b, v16.16b, #3
  ursra v13.16b, v16.16b, #3
  ursra v14.16b, v16.16b, #3
  ursra v15.16b, v16.16b, #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)033f51inst 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)9fa1a8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602044006130030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000201111011831600400361600001004004040040400404004040040
1602044003930030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000201111011801600400361600001004004040040400404004040040
1602044003930030251601081001603041001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011801600400361600001004004040040400404004040040
1602044003930030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011801600400361600001004004040040400404004040040
16020440039300302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010007291111011801600400361600001004004040040400404004040040
1602044003929930251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000101111011801600400361600001004004040040400404004040040
1602044003930030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000301111011801600400361600001004004040040400404004040040
1602044003930030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000201111011801600400361600001004004040040400404004040040
1602044003930030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000101111011801600400861600001004004040040400404004040040
1602044003929930251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000101111011801600400361600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0304070a0b1e3a3f51inst 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)5f60696b6d6edispatch 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)itlb miss (d4)d5d6d9dadbddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160024400513001000750462516001010160000101600005012800002140020040039400391999632001916001020160000203200004003940039111600211091010160000100063601002261102416211282840036155160000104004040040400404004040040
1600244003930000009046251600101016000010160000501280000114002004003940039199963200191600102016000020320000400394003911160021109101016000010001001002231102516211142440036155160000104004040040400404004040040
1600244003930000000046251600101016000010160000501280000114002004003940039199963200191600102016000020320000400394003911160021109101016000010001001002262102816221242740036155160000104004040040400404004040040
1600244003930000000052251600101016000010160000501280000014002004003940039199963200191600102016000020320000400394003911160021109101016000010000001002231202116211282240036315160000104004040040400404004040040
1600244003929900000046251600101016000010160000501280000114002004003940039199963200191600102016000020320000400394003911160021109101016000010000001002231102816211282740036155160000104004040040400404004040040
1600244003930000000046251600101016000010160000501280000114002004003940039199963200191600102016000020320000400394003911160021109101016000010000001002561102616211262640036155160000104004040040400404004040040
1600244003930000000046251600101016029110160000501280000114002004003940039199963200191600102016000020320000400394003911160021109101016000010002001002231102816211272640036155160000104004040040400404004040040
1600244003930000000046251600101016000010160000501280000114002004003940039199963200191600102016000020320000400394003911160021109101016000010001001002462202716322172940036155160000104004040040400404004040040
1600244003929901100046251600101016000010160000501280000114002004003940039199963200191600102016000020320000400394003911160021109101016000010000001002562202616311262640036155160000104004040040400404004040040
1600244003930000000046251600101016000010160000501280000014002004003940039199963200191600102016000020320000400394003911160021109101016000010000001002231101416211242540036155160000104004040040400404004040040