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

Test 1: uops

Code:

  ursra 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)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)a0a1a8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
10043037220612548251000100010003983131301830373037241532895100010002000303730371110011000400073116112630100030383038303830383038
10043037230822548251000100010003983131301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
100430372301032548251000100010003983131301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
10043037230612548251000100010003983130301830373037241532895100010002000303730371110011000001073116112630100030383038303830383038
10043037230612548251000100010003983130301830373037241532895100010002000303730371110011000001073116112630100030383038303830383038
10043037230612548251000100010003983130301830373037241532895100010002000303730371110011000000373116112630100030383038303830383038
10043037230612548251000100010003983130301830373037241532895100010002000303730371110011000000373116112630100030383038303830383038
10043037230822548251000100010003983130301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
10043037230612548251000100010003983131301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038
100430372302722548251000100010003983131301830373037241532895100010002000303730371110011000000073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  ursra 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)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)9fa8acbranch mispredict (cb)cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372250212295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
1020430037225061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
1020430037225061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007351161129634100001003003830038300383003830038
1020430037225061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
10204300372240193295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
10204300372250191295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
1020430037225061295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
1020430037225066295482510100100100001001000050042773130300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
1020430037225061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038
1020430037225061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000007101161129634100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03080918191e1f3a3f4e51inst 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)60696b6d6edispatch 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)9fa0a1a6a7a8a9acc2cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037225000000012629548251001010100001010000504277313130018030037300372828732876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830038300383003830038
1002430037225000000018729548251001010100001010000504277313130018030037300372828732876710010201000020200003003730037111002110910101000010000000006402162229630010000103008530086300383003830038
100243003722500000006129548251001010100001010000504277313130018030037300372828732878410010201000020200003003730037111002110910101000010000000006402162229630010000103003830038300383003830038
1002430037224000000018429548251001010100001010000504277313130018330037300372828732876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830038300383003830038
100243003722500000008229548251001010100001010000504277313130018030037300372828732876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830038300383003830038
100243003722500000006129548251001010100001010000504277313130018030037300372828732876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830038300383003830038
100243003722500000006129548251001010100001010000504277313130018030037300372828732876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830038300383003830038
1002430037224000000023129548251001010100001010000504277313130018030037300372828732876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830038300383003830038
1002430037224000000021029548251001010100001010000504277313130018030037300372828732876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830038300383003830038
1002430037225000000027729548251001010100001010000504277313130018030037300372828732876710010201000020200003003730037111002110910101000010000000006402162229630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  ursra 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)03080b18191e1f3f4e51inst 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)9fa8acc5branch mispredict (cb)cdcfd6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372240000006129547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100001117171622296460100001003003830038300383003830038
10204300372250000906129547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100001117181600296460100001003003830038300383003830038
10204300372250000006129547251010010010000100100005004277160030018300373003728271628741101002001000820020016300373003711102011009910010010000100001117181600296460100001003003830038300383003830038
10204300372250000006129547251010010010000100100005004277160030018300373003728271728740101002001000820020016300373003711102011009910010010000100001117171600296460100001003003830038300383003830038
10204300372250000006129547251010010010000100100005004277160030018300373003728271628740101002001000820020016300373003711102011009910010010000100001117171610296460100001003003830038300383003830038
10204300372250000006129547251010010010000100100005004277160130018300373003728271728740101002001000820020016300373003711102011009910010010000100101117171600296450100001003003830038300383003830038
10204300372250000006129547251010010010000100100005004277160030018300373003728271628741101002001000820020016300373003711102011009910010010000100001117171600296450100001003003830038300383003830038
10204300372250000006129547251010010010000100100005004277160030018300373003728271628741101002001000820020016300373003711102011009910010010000100001117181600296450100001003003830038300383003830038
102043003722500000023229547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100001117171600296450100001003003830038300383003830038
10204300372250000906129547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100001117181600296450100001003003830038300383003830038

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)9fa7a8c5cfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037224061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000640316342962910000103003830038300383003830038
1002430037225061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000640416322962910000103003830038300383003830038
1002430037225061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000640416452962910000103003830038300383003830038
1002430037225061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010200640416242962910000103003830038300383003830038
1002430037225061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000640416342962910000103003830038300383003830038
1002430037225061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000640316432962910000103003830038300383003830038
10024300372240149295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010070640416332962910000103003830038300383003830038
1002430037225061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037211002110910101000010000640416332962910000103003830038300383003830038
1002430037225066295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000640316242962910000103003830038300383003830038
1002430037225061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000640316242962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  ursra v0.8b, v8.8b, #3
  movi v1.16b, 0
  ursra v1.8b, v8.8b, #3
  movi v2.16b, 0
  ursra v2.8b, v8.8b, #3
  movi v3.16b, 0
  ursra v3.8b, v8.8b, #3
  movi v4.16b, 0
  ursra v4.8b, v8.8b, #3
  movi v5.16b, 0
  ursra v5.8b, v8.8b, #3
  movi v6.16b, 0
  ursra v6.8b, v8.8b, #3
  movi v7.16b, 0
  ursra 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)030a191e3f51inst 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)696d6e74scheduler 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)9fa0a8acc5branch mispredict (cb)cdcfd6e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602042009015100331152580116100800161008002850064019620045200652006506128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
160204200651510002925801161008001610080028500640196200452006520065061280128200800282001600562006520065111602011009910010016000010024901111011916200621600001002006620066200662006620066
160204200651500004662580116100800161008002850064019620045200652013306128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
16020420065150000292580116100800161008002850064019620045200652006506128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
16020420065150000292580116100800161008002850064019620045200652006506128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
16020420065150000292580116100800161008002850064019620045200652006506128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
16020420065150000292580116100800161008002850064019620045200652006506128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
16020420065151000292580116100800161008002850064019620045200652006506128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
16020420065150000292580116100800161008002850064019620045200652006506128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066
16020420065150000522580116100800161008002850064019620045200652006506128012820080028200160056200652006511160201100991001001600001000001111011916200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)030718191e3f51inst 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)9fa0a8c2cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1600242005915000004525800101080000108000050640000112002720046200463228001020800002016000020046200461116002110910101600001000010029311222044311152004315160000102004720047200472004720047
160024200461500100512580010108000010800005064000001200312005020050322800102080000201600002005020050111600211091010160000100001003362242036311062004315160000102004720047200472004720047
1600242004615000004525800101080000108000050640000112002720046200463228001020800002016000020046200461116002110910101600001000010029311102038316152004315160000102004720047200472004720047
1600242004615000004525800101080000108000050640000112002720046200463228001020800002016000020046200461116002110910101600001000010029311152037315142004315160000102005120047200472004720047
160024200501500000156258001010800001080000506400000120031200502005032280010208000020160000200462005011160021109101016000010000100326228244232682004730160000102005120051200512005120051
16002420050150000215125800101080000108000050640000112003120046200503228001020800002016000020050200461116002110910101600001000010032311720463212122004730160000102005120051200512005120051
16002420050150000074258001010800001080000506400000120031200502005032280010208000020160000200502005011160021109101016000010000100316228243231992004730160000102005120051200512005120051
160024200501500000512580010108000010800005064000001200312005020050322800102080000201600002005020050111600211091010160000100001003532232438321052004730160000102005120051200512005120051
160024200501500000512580010108000010800005064000011200312005020050322800102080000201600002005020050111600211091010160000100001003562262444421382004730160000102005120051200512005120051
160024200501500000512580010108000010800005064000001200312005020050322800102080000201600002004620050111600211091010160000100001003161292442321362004730160000102005120051200472005120051

Test 5: throughput

Count: 16

Code:

  ursra v0.8b, v16.8b, #3
  ursra v1.8b, v16.8b, #3
  ursra v2.8b, v16.8b, #3
  ursra v3.8b, v16.8b, #3
  ursra v4.8b, v16.8b, #3
  ursra v5.8b, v16.8b, #3
  ursra v6.8b, v16.8b, #3
  ursra v7.8b, v16.8b, #3
  ursra v8.8b, v16.8b, #3
  ursra v9.8b, v16.8b, #3
  ursra v10.8b, v16.8b, #3
  ursra v11.8b, v16.8b, #3
  ursra v12.8b, v16.8b, #3
  ursra v13.8b, v16.8b, #3
  ursra v14.8b, v16.8b, #3
  ursra 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.2503

retire (01)cycle (02)03070a1e1f3f51inst 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)9fa8acc2c5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160204400593000100302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118116114003601600001004004040040400404004040040
160204400393001100502516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118116114003601600001004004040040400404004040040
160204400393001100302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118116114003601600001004004040040400404004040040
160204400393001100302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940247111602011009910010016000010000011110118216114003601600001004004040040400404004040040
160204400392991100302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118116114003601600001004004040040400404004040040
16020440039300110038142516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118116114003601600001004004040040400404004040040
160204400392991100302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118116114003601600001004004040040400404004040040
160204400393001100302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118116114003601600001004004040040400404004040040
160204400393001100302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940238111602011009910010016000010000011110118116114003601600001004004040040400404004040040
1602044003930011006952516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118116114003601600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)030407090a0b18191e1f3a3f51inst 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)9fa0a6a8a9acc2cfd0d2icache miss (d3)itlb miss (d4)d5d6d9dadbddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1600244005130000000000004625160010101600001016000050128000011540020400394003919996320019160010201600002032000040077400391116002110910101600001000000010022821037163222818400364113160000104004040040400404004040040
16002440039300110100000187251600101016000010160000501280000115400204003940039199963200191600102016000020320000400574003911160021109101016000010000000100251122129163223117400364113160000104004040040400404004040040
16002440039300110100000075251600101016000010160000501280000000400204003940039199963200191600102016000020320000400484003911160021109101016000010000000100271132125163221629400364113160000104004040040400404004040040
16002440039300110100000187251600101016000010160000501280000015400204003940039199963200191600102016000020320000400524003911160021109101016000010000000100271132131163221629400364113160000104004040040400404004040040
16002440039300100000000075251600101016000010160000501280000005400204003940039199963200191600102016000020320000400644003911160021109101016000010000000100271132128163223125400364113160000104004040040400404004040040
16002440039300100000000187251600101016000010160000501280000015400204003940039199963200191600102016000020320000400484003911160021109101016000010000000100271142131163222929400364113160000104004040040400404004040040
16002440039300110100000087251600101016000010160000501280000000400204003940039199963200191600102016000020320000400644003911160021109101016000010001000100271132131163224227400364113160000104004040040400404004040040
16002440039300100000000075251600101016000010160000501280000015400204003940039199963200191600102016000020320000400494003911160021109101016000010000000100251122117163223218400364113160000104004040040400404004040040
16002440039300100000000175251600101016000010160000501280000000400204003940039199963200191600102016000020320000400544003911160021109101016000010000000100271132131163223128400364113160000104004040040400404004040040
16002440039300110100000187251600101016000010160000501280000000400204003940039199963200191601222016000020320000400524003911160021109101016000010000000100271132122163221730400364113160000104004040040400404004040040