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, 2S)

Test 1: uops

Code:

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

(no loop instructions)

1000 unrolls and 1 iteration

Retires: 1.000

Issues: 1.000

Integer unit issues: 0.000

Load/store unit issues: 0.000

SIMD/FP unit issues: 1.000

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

Test 2: Latency 1->1

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)03090b18191e1f3a3f4e51inst 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)9fa8acc2c5cfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
102043003722500000006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038
102043003722500000006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038
102043003722500000006129548251010010010000100100005004277313130022300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038
102043003722500006006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003721102011009910010010000100000071011611296340100001003003830038300383003830038
102043003722500000006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038
102043003722500000006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038
102043003722500000006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038
102043003722500000006129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038
1020430037224000000025129548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038
1020430037225000000072629548251010010010000100100005004277313130018300373003728265328745101002001000020020000300373003711102011009910010010000100000071011611296340100001003003830038300383003830038

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)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)9fa1a6a7a8a9accfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722506129548251001010100001010148504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000006404166429630010000103003830038300383003830038
100243003722506129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000006406166529630010000103003830038300383003830038
100243003722508229548251001010100001010000504277313130054300373003728287328767100102010000202000030037300371110021109101010000100000006406165629630010000103003830038300383003830038
1002430037225025129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000006406166629630010000103003830038300383003830038
100243003722506129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000006406166629630010000103003830038300383003830038
100243003722406129548251001010100001010000504277313130018300373003728287328767100102010000202000030084300371110021109101010000100000006406166529630010000103003830038300383003830038
100243003722506129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000006405165529630010000103003830038300383003830038
100243003722506129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000006405165529630010000103003830038300383003830038
100243003722506129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000006405165529630010000103003830038300383003830038
100243003722506129548251001010100001010000504277313130018300373003728287328767100102010000202000030037300371110021109101010000100000006405165529630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)030b1e1f3f4e51inst 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)cdcfd5d6inst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204302262250006129547251010010010000100100005004277160030018300373003728271628741101002001000820020016300373003711102011009910010010000100000001117171160296450100001003003830038300383003830038
1020430037225030018929547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100000031117170160296460100001003003830038300383003830038
10204300372250008429547251011010410000100100005004278512030018300373003728271728740102542001000820420016300373003711102011009910010010000100075001117180160296460100001003003830038300383003830038
1020430037225000107295472510100100100001001015051142785121300543003730037282711228758101002001000820021346300373003711102011009910010010000100002001117170160296450100001003003830038300383003830038
102043003722500010329547251010010010000100100005004277160030018300373003728271628740101002001000820020016300373003711102011009910010010000100001001117170160296460100001003003830180301343003830038
1020430037225057010329547251010010010000104101505004277160030018300373003728271628741101002001000820020016300373003711102011009910010010000100000001117180160296450100001003003830038300383003830038
10204300372240026410329547251010010010000100100005004277160030018300373003728271728740101002001000820020016300373003741102011009910010010000100000001117170160296450100001003003830038300383003830038
102043003722501321766129547251010010010000100101505004277160030018300373003728271728741101002001000820020016300373003721102011009910010010000100105028131117170160296450100001003003830038300383003830038
102043003722510010329538251010010010000100100005004277160030018300373003728271628740101002101000820020016300373003711102011009910010010000100002291117180160296460100001003003830038301843003830038
10204300372250006129547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100001001117180160296450100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)0318191e3f4e51inst 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)9fa0a6a8a9accdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
100243003722400061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000001640216222962910000103003830038300383003830038
100243003722500061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000000640216222962910000103003830038300383003830038
100243003722400061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000000640216222962910000103003830038300383003830038
100243003722500061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000000640216222962910000103022730038300383003830038
100243003722500061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000000640216222962910000103003830038300383003830038
100243003722500061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010001000640216222962910000103003830038300383003830038
100243003722500061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000000640216222962910000103003830038300383003830038
100243003722500061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000000640216222962910000103003830038300383003830038
100243003722500061295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000000640216222962910000103008630038300383003830038
1002430037225000825295472510010101000010100005042771603001830037300372828632876710010201000020200003003730037111002110910101000010000000640216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

retire (01)cycle (02)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)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)9fa6a7a8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16020420090151000591258011610080016100800285006401960020045200652006561280128200800282001600562006520065111602011009910010016000010000001111012221633200621600001002006620066200662006620149
16020420065150000138258011610080016100800285006401960020045200652006561280128200800282001600562006520065111602011009910010016000010000001111012141644200621600001002006620066200662006620066
1602042006515000029258011610080016100800285006401960020045200652006561280128200800282001600562006520065111602011009910010016000010000001111012341634200621600001002006620066200662006620066
16020420065150000503258011610080016100800285006401960020045200652006561280128200800282001600562006520065111602011009910010016000010000001111012131633200621600001002006620066200662006620066
1602042006515000029258011610080016100800285006401960020045200652006561280128200800282001600562006520065111602011009910010016000010000001111012241644200621600001002006620066200662006620066
160204200651500001197258011610080016100800285006401960020045200652006561280128200800282001600562006520065111602011009910010016000010000001111012331634200621600001002006620066200662006620066
160204200651500030117258011610080016100800285006401960020045200652006561280128200800282001600562006520065111602011009910010016000010000001111012331643200621600001002006620066200662006620066
160204200651500016229258011610080016100800285006401960020045200652006561280128200800282001600562006520065111602011009910010016000010000201111012231644200621600001002006620066200662006620066
1602042006515000029258011610080016100800285006401960020045200652006561280128200800282001600562006520065111602011009910010016000010000001111012241634200621600001002006620066200662006620066
16020420065151000115258011610080016100800285006401960020045200652006561280128200800282001600562006520065111602011009910010016000010000001111012241643200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0318191e1f3f51inst 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)9fa6a8c5cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0ea? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
16002420066150000012025800101080000108000050640000112002720046200463228001020800002016000020046200501116002110910101600001000010027311520211532004315160000102004720047200512004720047
16002420046150210083625800101080000108000050640892012002720046200463228001020800002016000020050200461116002110910101600001000010027311320211442004315160000102004720047200472004720047
1600242004615000004525800101080000108000050640000112002720046200463228001020800002016000020046200461116002110910101600001000010026311320211332004315160000102004720047200472004720047
16002420046150000012925800101080000108000050640000112002720046200463228001020800002016000020046200461116002110910101600001000010026311420211442004315160000102004720047200472004720047
1600242004615000004525800101080000108000050640000012002720046200463228001020800002016000020046200461116002110910101600001000010027321420211652004315160000102004720047200472004720047
16002420046151000012925800101080000108000050640000112002720046200463228001020800002016000020050200461116002110910101600001000010027311420211232004315160000102004720051200472004720051
160024200461500000111425800101080000108000050640000112002720046200463228001020800002016000020046200461116002110910101600001000010026311320211432004315160000102004720047200472004720047
1600242004616000004525800101080000108000050640000112002720046200463228001020800002016000020046200461116002110910101600001000010027321420211442004315160000102004720047200472004720047
1600242004615000004525800101080000108000050640000112002720046200463228001020800002016000020046200461116002110910101600001000010026311420211332004715160000102004720047200472004720047
1600242004615100004525800101080000108000050640000112002720046200503228001020800002016000020046200461116002110910101600001000010026311420211352004315160000102004720051200472004720047

Test 5: throughput

Count: 16

Code:

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

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

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

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)60696d6edispatch stall (70)72scheduler rewind (75)scheduler stall (76)~dispatch op (78)~map op int (7c)~map op fp/simd (7e)~map lookup int (7f)~map lookup fp/simd (81)8283pipeline redirect (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst b.cc (94)inst integer (97)inst neon or fp (9a)9fa8acc5branch mispredict (cb)cdcfd6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602044006130003025160108100160008100160020500128013214002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000111101181610400361600001004004040040400404004040040
1602044003930003025160108100160008100160020500128013214002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000111101181620400361600001004004040040400404004040040
1602044003930003025160108100160008100160020500128013204002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000111101181610400361600001004004040040400404004040040
1602044003930003025160108100160008100160020500128013204002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000111101181610400881600001004004040040400404004040040
1602044003930003025160108100160008100160020500128013214002040039400891997706199901601202001600322003200644003940039111602011009910010016000010000111101181620400361600001004004040040400914004040040
1602044003929903025160108100160008100160020500128013204002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000111101181610400361600001004004040040400404004040040
1602044003930003025160108100160008100160020500128013204002040039400391997706199901601202001600322003200644003940039111602011009910010016000010003111101181620400361600001004004040040400404004040040
16020440039300753025160108100160008100160020500128013204002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000111101181610400361600001004004040040400404004040040
1602044003930003025160108100160008100160020500128013204002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000111101181610400361600001004004040040400404004040040
1602044003930003025160108100160008100160020500128013204002040039400391997706199901601202001600322003200644003940039111602011009910010016000010000111101181620400361600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)030407090a1e1f3a3f51inst 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)9faccfd0d2icache miss (d3)itlb miss (d4)d5d6d9dadbddinst fetch restart (de)e0eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160024400393001010088332125160107101600001016000050128000001400204003940091199963200471600102016000020320000400394003911160021109101016000010010026321147163124242400361610160000104004040040400404004040040
16002440039299111100171525160010101600001016000050128000001400204003940039199963200191600102016000020320000400394003911160021109101016000010010023622142163124027400363110160000104004040040400404004040040
16002440039300111000144425160010101600001016000050128000001400204003940039199963200191600102016000020320000400394003911160021109101016000010010026622143163224242400363110160000104004040040400404004040040
1600244003930011100002062516001010160000101600005012800000140020400394003919996320019160010201600002032000040039400391116002110910101600001031002461214316322434340036165160000104004040040400404004040040
1600244003929911110011202516001010160000101603205012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001001002431113516111413640036165160000104004040040400404004040040
1600244003930011110011032516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001001002331114416111462540036155160000104004040040400404004040040
1600244003930011100002122516001010160000101600005012807881140020400394003919996320019160010201600002032000040039400391116002110910101600001001002431114316111424240036165160000104004040040400404004040040
1600244003929911110011032516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001001002331112616111364440036165160000104004040040400404004040040
160024400392991111000912516001010160000101600005012800001140020400394003920011320019160010201600002032000040039400391116002110910101600001001002431114416111464240036165160000104004040040400404004040040
1600244003930010110001032516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001001002431115816111453640036165160000104004040040400404004040040