Apple M1 Microarchitecture Research by Dougall Johnson

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

USRA (vector, 16B)

Test 1: uops

Code:

  usra 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)03080b18191e1f3f4e51inst 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)a1a6a8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10043037240000006125482510001000100039831303018303730372415328951000100020003037303711100110000000073116112667100031073084308630863086
10043083231111128874125394910081000114939967003054311230842418629141000100023363083308511100110002000280379140112659100030853086308630863085
1004308524101013288106425394410081000114939967003054308530842415729141149116823263084308521100110000022284094124112665100030863085303830383085
100430842400211478870425482510001000100039831303018303730372415328951000100020003037303711100110000000073116112630100030383038303830383038
10043037230000006125482510001000100039831303018303730372415328951000100020003037303711100110000000373116112630100030383038303830383038
100430372400001206125482510001000100039831303018303730372415328951000100020003037303711100110000000073116112630100030383038303830383038
100430372400000034625482510001000100039831303018303730372415328951000100020003037303711100110000000073116112630100030383038303830383038
10043037230000006125482510001000100039831303018303730372415328951000100020003037303711100110004000073116112630100030383038303830383038
10043037230000006125482510001000100039831303018303730372415328951000100020003037303711100110000000073116112630100030383038303830383038
10043037230000006125482510001000100039831313018303730372415328951000100020003037303711100110000000073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  usra 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)9fa0a1a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003723201872954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000107101161129634100001003003830038300383003830038
102043003723206129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000110587101161229634100001003003830038300383003830038
10204300372330612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003723312612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
10204300372330612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003008630086301353008530038
10204300372330612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003723306129548251010010010000100100005004277313030018300373003728265328745101002001000020020000300373003733110201100991001001000010000007101161129634100001003003830038300383003830038
102043003723201032954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
10204300372320612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
10204300372330612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038

1000 unrolls and 10 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)6061696d6edispatch 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)9fa0a1a6a7a8a9acc2cfd0d5d6ddinst fetch restart (de)e0? int output thing (e9)ec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372330000000010002954825100101010000101000050427731315300183003730037282873287671001020100002020000300373003711100211091010100001000000000640531634296300010000103003830038300383003830038
10024300372320000000011672954825100101010000101000050427731315300183003730037282873287671001020100002020000300373003711100211091010100001000000000640541643296300010000103003830038300383003830038
10024300372330000000011942954825100101010000101000050427731315300183003730037282873287671001020100002020000300373003711100211091010100001000000000640541644296300010000103003830038300383003830038
100243003723300000000612954825100101010000101000050427731315300183003730037282873287671001020100002020000300373003711100211091010100001000000000640541634296300010000103003830085300853008530038
10024300372410000000012892954825100171010000101000050427731315300183003730037282873287671001020100002020000300373003711100211091010100001000000000640541643296300010000103003830038300383003830038
10024300372330000000010782954825100101010000101000050427731315300183003730037282873287671001020100002020000300373003711100211091010100001000000000640531644296300010000103003830038300383003830038
100243003723300000000118029548251001010100001010000504277313153001830037300372828732876710010201000020200003003730037111002110910101000010000000150640541643296300010000103003830038300383003830038
10024300372250000000010922954825100101010000101000050427731315300183003730037282873287671001020100002020000300373003711100211091010100001000000000640541644296300010000103003830038300383003830038
1002430037225000000009682954825100101010000101000050427731315300183003730037282873287671001020100002020000300373003711100211091010100001000000000640531634296300010000103003830038300383003830038
100243003722500000189008752954825100101010000101000050427731315300183003730037282873287671001020100002020000300373003711100211091010100001000000000640541634296300010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  usra 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)03081e3a3f4e51inst 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)9fa0a1a8a9acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003723307219729547251010010010000100100005004277160030018300373003728252628733101002001000020020000300373003711102011009910010010000100000001117223242229629100001003003830038300383003830038
102043003723306619729547251010010010000100100005004277160030018300373003728252628733101002001000020020000300373003711102011009910010010000100000001117223312229629100001003003830038300383003830038
10204300372320019729547251010010010000100100005004277160030018300373003728252628733101002001000020020000300373003711102011009910010010000100000001117225242229629100001003003830038300383003830038
10204300372330006129547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100000001117170160029645100001003003830038300383003830038
10204300372330006129547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100000001117180160029645100001003003830038300383003830038
10204300372330006129547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100001001117170160029717100001003003830038300383003830038
10204300372330006129547251010010010000100100005004277160030018300373003728292728741101002001000820020016300373003711102011009910010010000100000001117170160029646100001003003830038300383003830038
10204300372330006129547251010010010000100100005004277160130018300373003728271628740101002001000820020016300373003711102011009910010010000100000001117180160029645100001003003830038300383003830038
10204300372330006129547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100000001117180160029646100001003003830038300383003830038
102043003723300072629547251010010010000100100005004277160030018300373003728271628740101002001000820020016300373003711102011009910010010000100000001117170160029645100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03181e1f3f4e51inst 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)9fa8acc2cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037233012061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
100243003723303061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103008530038300383003830038
100243003724100061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
100243003723300061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
100243003723300061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
100243003723300061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010100640216222962910000103003830038300383003830038
1002430037232000441295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
100243003723300061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
100243003724100061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
100243003723200061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  usra v0.16b, v8.16b, #3
  movi v1.16b, 0
  usra v1.16b, v8.16b, #3
  movi v2.16b, 0
  usra v2.16b, v8.16b, #3
  movi v3.16b, 0
  usra v3.16b, v8.16b, #3
  movi v4.16b, 0
  usra v4.16b, v8.16b, #3
  movi v5.16b, 0
  usra v5.16b, v8.16b, #3
  movi v6.16b, 0
  usra v6.16b, v8.16b, #3
  movi v7.16b, 0
  usra 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)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)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)9fa0a1a8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602042006515502925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100000311110119216002006201600001002006620066200662006620066
1602042006515502925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100000011110119016002006201600001002006620066200662006620066
1602042006515502925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100000011110119016002006201600001002006620066200662006620066
1602042006515602925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100000011110119016002006201600001002006620066200662006620066
16020420065155122925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100000011110119016002006201600001002006620066200662006620066
1602042006515502925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100000011110119016002006201600001002006620066200662006620066
1602042006515502925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100721011110119016002006201600001002006620066200662006620066
1602042006515602925801161008001610080028500640196200452006520065612801282008002820016005620065200651116020110099100100160000100000011110119016002006201600001002006620066200662006620066
16020420065161065298011910080019100800315006402202005620077200771012801312008003120016006220077200781116020110099100100160000100000022210130123112007401600001002007820078200782007820078
1602042007715606529801191008001910080031500640220200562007720078912801312008003120016006220077200771116020110099100100160000100000022210130123112007401600001002007820079200792007820078

1000 unrolls and 10 iterations

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

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)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)9fa6a8accfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160024200851501287278001010800001080000506400001152003320060200603228001020800002016000020060200601116002110910101600001000010038111123634421171220057402160000102005220061200612006120052
16002420060150125127800101080000108000050640000015200412006020060322800102080000201600002005120060111600211091010160000100001004111421234421121320057401160000102006120061200522006120061
160024200601500512980010108000010800005064000011520032200512005132280010208000020160000200602006011160021109101016000010000100378521334422181720057401160000102006120061200612006120052
1600242005115112932980010108000010800005064000001520041200692006032280010208000020160000200512006011160021109101016000010000100378511325422131320057401160000102006120061200612006120052
1600242006015004527800101080000108000050640000115200322005120051322800102080000201600002005120051111600211091010160000100340100378411525291171120048201160000102005220052200522005220052
1600242005115112452780010108000010800005064000011520032200512005132280010208000020160000200512005111160021109101016000010000100358411225211131920048201160000102005220052200522005220052
16002420051150122022780010108000010800005064000011520032200512005132280010208000020160000200512005111160021109101016000010000100378411125211191420048201160000102005220052200522005220052
160024200511500452780010108000010800005064000011520032200512005132280010208000020160000200512005111160021109101016000010000100368411325211111320048201160000102005220052200522005220052
160024200511510452780010108000010800005064000011520032200512005132280010208000020160000200512005111160021109101016000010000100378411325211141220048201160000102005220052200522005220052
160024200511500452780010108000010800005064000011520032200512005132280010208000020160000200512005111160021109101016000010000100418411325211111420048201160000102005220052200522005220052

Test 5: throughput

Count: 16

Code:

  usra v0.16b, v16.16b, #3
  usra v1.16b, v16.16b, #3
  usra v2.16b, v16.16b, #3
  usra v3.16b, v16.16b, #3
  usra v4.16b, v16.16b, #3
  usra v5.16b, v16.16b, #3
  usra v6.16b, v16.16b, #3
  usra v7.16b, v16.16b, #3
  usra v8.16b, v16.16b, #3
  usra v9.16b, v16.16b, #3
  usra v10.16b, v16.16b, #3
  usra v11.16b, v16.16b, #3
  usra v12.16b, v16.16b, #3
  usra v13.16b, v16.16b, #3
  usra v14.16b, v16.16b, #3
  usra 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)0318191e3f51inst 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)9fa0a1a6a7a8acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16020440057310000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000001111011831600400361600001004004040040400404004040040
160204400393110003025160108100160008100160020500128013204002040039400391997712200451601202001600322003200644003940039111602011009910010016000010000000001111011801600400361600001004004040040400404004040040
16020440039310000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000001111011801600400361600001004004040040400404004040040
16020440039310000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000001111011801600400361600001004004040040400404004040040
16020440039310000302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000001111011801600400361600001004004040040400404004040040
16020440039310000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000001111011801600400361600001004004040040400404004040040
16020440039311003611752516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010004000001111013601600400361600001004004040040400404004040040
16020440039310000302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000001111011801600400361600001004004040197400404004040040
16020440039310000722516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000001111011801600400361600001004004040040400404004040040
16020440039310000302516010810016000810016002050012807880400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000001001111011801600400361600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0304070b18191e1f353f51inst 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)9fa6a8a9accfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16002440050310000000001625251600101016000010160000501280000014002040039400391999632001916001020160000203200004003940111211600211091010160000100000100246225162116640036155160000104004040040400404004040040
1600244003931100000000522516001010160068101600005012800000140020400394003919996320019160010201600002032000040039400391116002110910101600001000001002462261642246400363010160000104004040040400404004040040
1600244003931100000000462516001010160000101600005012800002140020400394003919996320019160010201600002032000040039400391116002110910101600001000001002462291642246400363010160000104004040040400404004040040
1600244003931000000000522516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000001002262110162116640036158160000104004040040400404004040040
160024400393110000000046251600101016000010160000501280000214002040039400391999632001916001020160000203200004003940039111600211091010160000100000100223224162116940036155160000104004040040400404004040040
1600244003931000000000462516001010160000101600005012800002140020400394003919996320019160010201600002032000040039400391116002110910101600001000001002462251642289400363010160000104004040040400404004040040
160024400393110000000046251600101016000010160000501280000014002040039400391999632001916001020160000203200004003940039111600211091010160000100000100223119162118540036155160000104004040040400404004040040
1600244003931000000000462516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000001002261161621174400361510160000104004040040400404004040040
160024400393100000000046251600101016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000100223115162115640036155160000104004040040400404004040040
160024400393100000000046251600101016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000100243119162119840036155160000104004040040400404004040040