Apple M1 Microarchitecture Research by Dougall Johnson

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

SQRSHRUN2 (8H)

Test 1: uops

Code:

  sqrshrun2 v0.16b, v1.8h, #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)a0a1a6a7a8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)f5f6f7f8fd
1004303723000000612548251000100010003983130301830373037241532895100010002000303730371110011000000000073216222630100030383038303830383038
1004303722000000612548251000100010003983130301830373037241532895100010002000303730371110011000000000073216222630100030383038303830383038
1004303723000000612548251000100010003983130301830373037241532895100010002000303730371110011000000000073216222630100030383038303830383038
1004303723000000952548251000100010003983130301830373037241532895100010002000303730371110011000000000073216222630100030383038303830383038
1004303722000000612548251000100010003983130301830373037241532895100010002000303730371110011000000000073216222630100030383038303830383038
1004303722000000612548251000100010003983130301830373037241532895100010002000303730371110011000000000073216222630100030383038303830383038
10043037230000002272548251000100010003983130301830373037241532895100010002000303730371110011000000000073216222630100030383038303830383038
10043037220000006125482510001000100039831303018303730372415328951000100020003037303711100110000000150373216222630100030383038303830383038
1004303723000000612548251000100010003983130301830373037241532895100010002000303730371110011000000000073216222630100030383038303830383038
1004303723000000612548251000100010003983130301830373037241532895100010002000303730371110011000000010073216222630100030383038303830383038

Test 2: Latency 1->1

Code:

  sqrshrun2 v0.16b, v1.8h, #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)03081e3f4e51inst 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)9fa0a1a6a8a9acc5cdcfd5d6ddinst fetch restart (de)e0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372250061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000000071011611296340100001003003830038300383003830038
102043003722500124295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000000071011611296340100001003003830038300383003830038
102043003722500166295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000000071011611296340100001003003830038300383003830038
10204300372250061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000003000071011611296340100001003003830038300383003830038
102043003722500187295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000000071011611296340100001003003830038300383003830038
102043003722500124295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000000071011611296340100001003003830038300383003830038
10204300372250084295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000000071011611296340100001003003830038300383003830038
10204300372250061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000000071011611296340100001003003830038300383003830038
10204300372240061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001002400000071011611297060100001003003830038300383003830038
10204300372250061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000000000071011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire (01)cycle (02)030b1e3f4e51inst 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)9fa8accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1002430037225002102954825100101010000101000050427731313001830037300372828703287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
100243003722500612954825100101010000101000050427731303001830037300372828703287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
1002430037225001242954825100101010000101000050427731303001830037300372828703287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
1002430037225002102954825100101010000101000050427731303001830037300372828703287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
10024300372250128432954825100101010000101000050427731303001830037300372828703287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
1002430037225001052954825100101010000101000050427731313001830037300372828703287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
1002430037225001682954825100101010000101000050427731313001830037300372828703287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
1002430037225001492954825100101010000101000050427731303001830037300372828703287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
100243003722500612954825100101010000101000050427731313001830037300372828703287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
1002430037225001492954825100101010000101000050427731303001830037300372828703287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  sqrshrun2 v0.16b, v0.8h, #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)0308181e1f3a3f4e51inst 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)cdcfd6dde0? int output thing (e9)? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10204300372270000010329547251010010010000100100005004277160030018300373003728271628741101002001000820020016300373003711102011009910010010000100000111718160296460100001003003830038300383003830038
10204300372250027006129547251010010010000100100005004277160130018300373003728271628741101002001000820020016300373003711102011009910010010000100000111718160296460100001003003830038300383003830038
102043003722500390157229547251010010010000100100005004277160130018300373003728252628733101002001000020020000300373003711102011009910010010000100000111717160296450100001003003830038300383003830038
1020430037225000006129547251010010010000100100005004277160130018300373003728271628740101002001000820020016300373003711102011009910010010000100000111717160296460100001003003830038300383003830038
10204300372240015006129547251010010010000100100005004277160130018300373003728271628741101002001000820020016300373003711102011009910010010000100000111718160296460100001003003830038300383003830038
10204300372250000061295472510100100100001001000050042771601300183003730037282712028758101002001000820020016300373003711102011009910010010000100000111717160296450100001003003830038300383003830038
1020430037225000006129547251010010010000100100005004277160130018300373003728271728740101002001000820020016300373003711102011009910010010000100000111718160296450100001003003830038300383003830038
1020430037225000006129547251010010010000100100005004277160130018300373003728271628740101002001000820020016300373003711102011009910010010000100000111717160296460100001003003830038300383003830038
102043003722500150034929547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100030111718160296460100001003003830038300383003830038
10204300372250012006129547251010010010000100100005004277160130018300373003728271728741101002001000820020016300373003711102011009910010010000100000111717160296460100001003018530038300383003830038

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)9fa8a9accfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
10024300372250612954725100101010000101000050427716003001830037300372828632876710160201032922200003003730037111002110910101000010100640216222962910000103003830038300383003830038
10024300372250612954725100101010000101000050427716003001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024300372240612954725100101010000101000050427716003001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024300372250612954725100101010000101000050427716003001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024300372250612954725100101010000101000050427716003001830037300372828632876710010201000020200003022630037111002110910101000010000640216222962910000103003830038300383003830038
10024300372250612954725100101010000101000050427716003001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024300372250612954725100101010000101000050427716003001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024300372250612954725100101010000101000050427716003001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
100243003722506129547251001010100001010000504277160030018300373003728286328767100102010000202000030037300371110021109101010000101200640216222962910000103003830038300383003830038
10024300372250612954725100101010000101000050427716003001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  sqrshrun2 v0.16b, v8.8h, #3
  movi v1.16b, 0
  sqrshrun2 v1.16b, v8.8h, #3
  movi v2.16b, 0
  sqrshrun2 v2.16b, v8.8h, #3
  movi v3.16b, 0
  sqrshrun2 v3.16b, v8.8h, #3
  movi v4.16b, 0
  sqrshrun2 v4.16b, v8.8h, #3
  movi v5.16b, 0
  sqrshrun2 v5.16b, v8.8h, #3
  movi v6.16b, 0
  sqrshrun2 v6.16b, v8.8h, #3
  movi v7.16b, 0
  sqrshrun2 v7.16b, v8.8h, #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)03080918191e1f3f51inst 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)9facc5branch mispredict (cb)cdcfd6e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160204200901500000602925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066
160204200651510000002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066
160204200651500000002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066
160204200651500000002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066
160204200651500000002925801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066
160204200651500000002925801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066
160204200651500000002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066
160204200651500000002925801161008001610080028500640196020045200652030861280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662015720066
1602042006515000000069425801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066
160204200651510000002925801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010001111011916200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire (01)cycle (02)0307080a0b18191e1f3f51inst 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)9fa0a1a6a7a8a9acc2c5cfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0eaec? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1600242005415111113342035245104806401080628108052350640000115202232036920287196480325208042320160842203632042061160021109101016000010242010197100100398511920211191620043150160000102004720047200472004720047
16002420046150110000240452580115108000010800005064000011520027200462004632280010208000020160000200462004611160021109101016000010000020000100408411962211181520043150160000102004720047200472013620047
160024201261500000001680520658001010800001080000506400001152002720046200463228001020800002016000020046201352116002110910101600001000000255500100388411720211171720043150160000102004720128200472004720047
16002420046150000010603192580010108000010800005064000011520027200462004632280010208010620160000200462004611160021109101016000010000000000100398411520211171920043150160000102013820047200472004720128
16002420046151000000210452580010108000010800005064084811520027200462004632280010208000020160000200462004611160021109101016000010000000000100418511660211161920043150160000102004720047201372004720047
160024200461500000003903292580116108000010800005064000011520027200462004632280010208000020160000200462004611160021109101016000010000000000100418511620211161720043150160000102004720047200472004720047
16002420046150000110720452580010108000010800005064000011520027200462004632280010208000020160000200462004611160021109101016000010000000000100408511562211171920043150160000102004720126200472004720047
160024200461500000003004525800101080000108000050640000015200272004620046322800102080000201600002005020046111600211091010160000100000000001004211611720221181520043150160000102005120047200472004720047
1600242004615000000018051258001010800001080000506400001152002720046200501022800102080000201600002005020046111600211091010160000100000000001004411511920211181620043150160000102004720051200472004720051
16002420127150000000005125800101080000108000050640000115200272005020046114480010208000020160000200462005011160021109101016000010000000000100438521924411181520112150160000102005120047200512004720051

Test 5: throughput

Count: 16

Code:

  sqrshrun2 v0.16b, v16.8h, #3
  sqrshrun2 v1.16b, v16.8h, #3
  sqrshrun2 v2.16b, v16.8h, #3
  sqrshrun2 v3.16b, v16.8h, #3
  sqrshrun2 v4.16b, v16.8h, #3
  sqrshrun2 v5.16b, v16.8h, #3
  sqrshrun2 v6.16b, v16.8h, #3
  sqrshrun2 v7.16b, v16.8h, #3
  sqrshrun2 v8.16b, v16.8h, #3
  sqrshrun2 v9.16b, v16.8h, #3
  sqrshrun2 v10.16b, v16.8h, #3
  sqrshrun2 v11.16b, v16.8h, #3
  sqrshrun2 v12.16b, v16.8h, #3
  sqrshrun2 v13.16b, v16.8h, #3
  sqrshrun2 v14.16b, v16.8h, #3
  sqrshrun2 v15.16b, v16.8h, #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)030818191e3f51inst 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)9fa6a8acc5branch mispredict (cb)cdcfd5d6ddinst fetch restart (de)e0? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
1602044005930000002935251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011801600400361600001004004040040400404004040040
16020440039300000030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011801600400361600001004004040040400404004040040
16020440039299000030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011801600400361600001004004040040400404004040040
16020440039299000030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011801600400361600001004004040040400404004040040
160204400393000000600251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011801600400361600001004004040040400404004040040
16020440039300000030251601081001600761001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011801600400361600001004004040040400404004040040
16020440039300000030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011801600400361600001004004040040400404004040040
16020440039299000030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011801600400361600001004004040040400404004040040
16020440039300000030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011801600400361600001004004040040400404004040040
16020440039300000030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100991001001600001000001111011801600400361600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire (01)cycle (02)03040818191e1f3a3f51inst 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)9fa0a1a6a8a9accfd0d2icache miss (d3)d5d6d9dadbddinst fetch restart (de)e0? int output thing (e9)eaeb? fp/simd (ee)gpr retires (ef)f5f6f7f8fd
160024400392991000000462516001010160000101600005012800001140020040039400391999632001916001020160000203200004003940039111600211091010160000100000001002231181621153400360155160000104004040040400404004040040
160024400393001000000462516001010160000101600005012800001140020040039400391999632001916001020160000203200004003940039111600211091010160000100000001002431151621135400360155160000104004040040400404004040040
160024400392990000000462516001010160000101600005012800001140020040039400391999632001916001020160000203200004003940039111600211091010160000100000001002231131621154400360155160000104004040040400404004040040
160024400393000000000462516001010160000101600005012800001140020040039400391999632001916001020160000203200004003940039111600211091010160000100000001002231151621135400360155160000104004040040400404004040040
160024400393000000000792516001010160000101600005012800001140020040039400391999632001916001020160000203200004003940039111600211091010160000100000001002231151621135400360155160000104004040040400404004040040
160024400393000000000462516001010160000101600005012800001140020040039400391999632001916001020160000203200004003940039111600211091010160000100000001002462231621155400360155160000104004040040400404004040040
160024400393000000000462516001010160000101600005012800000140020040039400391999632001916001020160000203200004003940039111600211091010160000100000001002431151621135400360315160000104004040040400404004040040
1600244003930000000005225160010101600001016000050128000001400200400394003919996320019160010201600002032000040039400391116002110910101600001000000010024622516422554003603110160000104004040040400404004040040
160024400393000000000522516001010160000101600005012800000140020040039400391999632001916001020160000203200004003940039111600211091010160000100000001002232151621135400360155160000104004040040400404004040040
1600244003929900000005225160010101600001016000050128000001400200400394003919996320019160010201600002032000040039400391116002110910101600001000000010024622516422354003603010160000104004040040400404004040040