Apple Microarchitecture Research by Dougall Johnson

M1/A14 P-core (Firestorm): Overview | Base Instructions | SIMD and FP Instructions
M1/A14 E-core (Icestorm):  Overview | Base Instructions | SIMD and FP Instructions

SQSHRUN2 (4S)

Test 1: uops

Code:

  sqshrun2 v0.8h, v1.4s, #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 uop (01)cycle (02)031e3f4e51schedule uop (52)schedule simd uop (54)dispatch simd uop (57)ldst uops in schedulers (5b)696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map simd uop (7e)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst simd alu (9a)l1d tlb access (a0)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)f5f6f7f8fd
100430372208225482510001000100039831330183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372206125482510001000100039831330183037303724153289510001000200030373037111001100001073116112630100030383038303830383038
1004303723186125482510001000100039831330183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372306125482510001000100039831330183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372206125482510001000100039831330183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372206125482510001000100039831330183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372306125482510001000100039831330183037303724153289510001000200030373037111001100001073116112630100030383038303830383038
100430372306125482510001000100039831330183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372206125482510001000100039831330183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303722015625482510001000100039831330183037303724153289510001000200030373037111001100001073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  sqshrun2 v0.8h, v1.4s, #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 uop (01)cycle (02)03mmu table walk data (08)09l2 tlb miss data (0b)18191e1f3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)simd prf full (72)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb access (a0)ld unit uop (a6)l1d cache writeback (a8)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
10204300372250000000612954825101001001000010010000500427731303001830037300372826503287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830086300863013330038
102043003722500000003232954825101001001000010010000500427731313001830037300372826503287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
102043003722400000003282954825101001001000010010000500427731313001830037300372826503287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
10204300372250000000612954825101001001000010010000500427731313001830037300372826503287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
10204300372250000000612954825101001001000010010000500427731313001830037300372826503287451010020010000200200003003730037111020110099100100100001000010371011611296340100001003003830038300383003830038
10204300372250000000612954825101001001000010010000500427731313001830037300372826503287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
10204300372250000000612954825101001001000010010000500427731313001830037300372826503287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
102043003722500000001662954825101001001000010010000500427731303001830037300372826503287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
10204300372250000000612954825101001001000010010000500427731313001830037300372826503287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038
10204300372250000000612954825101001001000010010000500427731303001830037300372826503287451010020010000200200003003730037111020110099100100100001000000071011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)03mmu table walk data (08)l2 tlb miss data (0b)1e3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1002430037225000168295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000640316222963010000103003830038300383003830038
100243003722500061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
100243003722500061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
1002430037224000631295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
100243003722500061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300863008530038
100243003722500061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
1002430037225000105295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
100243003722500061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
100243003722500061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038
100243003722500061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000640216222963010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  sqshrun2 v0.8h, v0.4s, #3
  movi v0.16b, 1

(fused SUBS/B.cc loop)

100 unrolls and 100 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)031e3a3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9facbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
10204300372250061295472510100100100001001000050042771603001830037300372827172874110100200100082002001630037300371110201100991001001000010001117170160029645100001003003830038300383003830038
10204300372250061295472510100100100001001000050042771603001830037300372827172874110100200100082002001630037300371110201100991001001000010001117170160029646100001003003830038300383003830038
10204300372250061295472510100100100001001000050042771603001830037300372827172874010100200100082002001630037300371110201100991001001000010001117222242229629100001003008930038300383003830038
10204300372250061295472510100100100001001000050042771603001830037300372827162874010100200100082002001630037300371110201100991001001000010001117180160029645100001003003830038300383003830038
10204300372250061295472510100100100001001000050042771603001830037300372827162874010100200100082002001630037300371110201100991001001000010001117170160029645100001003003830038300383003830038
10204300372250061295472510100100100001001000050042771603001830037300372827172874110100200100082002001630037300371110201100991001001000010001117180160029645100001003003830038300383003830038
1020430037225003845295472510100100100001001000050042771603001830037300372827172874110100200100082002001630037300371110201100991001001000010001117180160029645100001003003830038300383003830038
10204300372250061295472510100100100001001000050042771603001830037300372827172874010100200100082002001630037300371110201100991001001000010001117170160029646100001003003830038300383003830038
10204300372250061295472510100100100001001000050042771603001830037300372827172874110100200100082002001630037300371110201100991001001000010001117180160029646100001003003830038300383003830038
10204300372240061295472510100100100001001000050042771603001830037300372827162874010100200100082002001630037300371110201100991001001000010001117170160029646100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)03l2 tlb miss data (0b)1e3f4e51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)simd prf full (72)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
10024300372250061295472510010101000010100005042771601300183003730037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771601300183003730037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771600300183003730037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771601300183003730037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372240061295472510010101000010100005042771601300183003730037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771601300183003730037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771601300183003730037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771601300183003730037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771600300183003730037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038
10024300372250061295472510010101000010100005042771600300183003730037282860328767100102010000202000030037300371110021109101010000100000640216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  sqshrun2 v0.8h, v8.4s, #3
  movi v1.16b, 0
  sqshrun2 v1.8h, v8.4s, #3
  movi v2.16b, 0
  sqshrun2 v2.8h, v8.4s, #3
  movi v3.16b, 0
  sqshrun2 v3.8h, v8.4s, #3
  movi v4.16b, 0
  sqshrun2 v4.8h, v8.4s, #3
  movi v5.16b, 0
  sqshrun2 v5.8h, v8.4s, #3
  movi v6.16b, 0
  sqshrun2 v6.8h, v8.4s, #3
  movi v7.16b, 0
  sqshrun2 v7.8h, v8.4s, #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 uop (01)cycle (02)03l1i tlb fill (04)mmu table walk data (08)09191e3a3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6erob full (74)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fld unit uop (a6)acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
160204200781501000123362580116100800161008002850064019612004520065200650612801282008002820016005620065200651116020110099100100160000100000111101337161113200621600001002006620066200662006620066
160204200651510000053625801161008001610080028500640196120045200652006506128012820080028200160056200652006511160201100991001001600001000001111013513161314200621600001002006620066200662006620066
160204200651501000056725801161008001610080028500640196120045200652006506128012820080028200160056200652006511160201100991001001600001000001111012714161211200621600001002006620066200662006620066
1602042006515010001241562580116100800161008002850064019612004520065200650612801282008002820016005620065200651116020110099100100160000100032111101351316612200621600001002006620066200662006620066
16020420065150100004362580116100800161008002850064019612004520065200650612801282008002820016005620065200651116020110099100100160000100000111101341116912200621600001002006620066200662006620066
16020420065150100094612580116100800161008002850064019612004520065200650612801282008002820016005620065200651116020110099100100160000100000111101331216612200621600001002006620066200662006620066
16020420065151000021461104801161008001610080028500640196120045200652006506128012820080028200160056200652006511160201100991001001600001000001111013513161413201301600001002006620066200662006620066
1602042006515100111546725801161008001610080028500640196120045200652006506128012820080028200160056200652006511160201100991001001600001000301111013513161113201321600001002015520150201572014920066
160204200651511003061072580116100800161008002850064019612004520065200650612801282008002820016005620065200651116020110099100100160000100000111101331116515200621600001002006620066200662006620066
1602042006515010000361258011610080016100800285006401961200452006520065028128012820080028200160056200652006511160201100991001001600001001001111013411161311200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)5f6061696d6emap rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d cache writeback (a8)acc2cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
16002420081156360452580010108000010800005064000001020027200462004632280010208000020160000200502004611160021109101016000010000100293216202115820043150160000102004720051200472004720047
160024200461510452580010108000010800005064000001020027200462004632280010208000020160000200462004611160021109101016000010000100313114202115620043150160000102004720047200472004720051
16002420046150273242580010108000010800005064000011020027200462004632280010208000020160000200462004611160021109101016000010000100293117202116820043150160000102004720047200472004720047
1600242004615039453680010108000010800005064000011020027200502004632280114208000020160000200522004611160021109101016000010000100283216202116620043150160000102004720047200472004720047
160024200461500452580010108000010800005064000011020027200462004632280010208000020160000200462004611160021109101016000010000100293226202116620049150160000102005120047200472004720047
1600242004615048452580010108000010800005064000011020027200462004632280010208000020160000200462005211160021109101016000010000100296226204217620043150160000102004720051200512005120051
160024200501500452580010108000010800005064000001020033200462004632280010208000020160000200502004611160021109101016000010000100286118202116520043150160000102004720047200532005120047
160024200461500452580010108000010800005064000011020027200462004632280010208000020160000200462004611160021109101016000010000100303127203128620047150160000102005120047200512004720051
160024200501500452580010108000010800005064000011020027200502004632280429208000020160000200462004611160021109101016000010000100296115242125720049150160000102005120047200472005320047
16002420050150423452580010108000010800005064000011020027200502004632280010208000020160000200462004611160021109101016000010000100293116202115620043150160000102004720047200472004720047

Test 5: throughput

Count: 16

Code:

  sqshrun2 v0.8h, v16.4s, #3
  sqshrun2 v1.8h, v16.4s, #3
  sqshrun2 v2.8h, v16.4s, #3
  sqshrun2 v3.8h, v16.4s, #3
  sqshrun2 v4.8h, v16.4s, #3
  sqshrun2 v5.8h, v16.4s, #3
  sqshrun2 v6.8h, v16.4s, #3
  sqshrun2 v7.8h, v16.4s, #3
  sqshrun2 v8.8h, v16.4s, #3
  sqshrun2 v9.8h, v16.4s, #3
  sqshrun2 v10.8h, v16.4s, #3
  sqshrun2 v11.8h, v16.4s, #3
  sqshrun2 v12.8h, v16.4s, #3
  sqshrun2 v13.8h, v16.4s, #3
  sqshrun2 v14.8h, v16.4s, #3
  sqshrun2 v15.8h, v16.4s, #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 uop (01)cycle (02)031e3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)60696d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)91inst branch cond (94)inst int alu (97)inst simd alu (9a)9facbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
160204400393003930251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100990100100160000100011110118016004003601600001004004040040400404004040040
16020440039300030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100990100100160000100011110118016004003601600001004004040040400404004040040
16020440039300030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100990100100160000100011110118016004003601600001004004040040400404004040040
16020440039299030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100990100100160000100011110118016004003601600001004004040040400404004040040
16020440039299030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100990100100160000100011110118116104003601600001004004040040400404004040040
16020440039300030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100990100100160000100011110118016004003601600001004004040040400404004040040
16020440039300030251601081001600081001600205001280132040020400394018919977619990160120200160032200320064400394003911160201100990100100160000100011110118016004003631600001004004040040400404004040040
16020440039300030251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100990100100160000100011110118016114003601600001004004040040400404004040040
16020440039300330251601081001600081001600205001280132140020400394003919977619990160120200160032200320064400394003911160201100990100100160000100011110118016004003601600001004004040040400404004040040
16020440039300030251601081001600081001600205001280132040020400394003919977619990160120200160032200320064400394003911160201100990100100160000100011110118016104003601600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3f51schedule uop (52)schedule int uop (53)schedule simd uop (54)dispatch int uop (56)dispatch simd uop (57)int uops in schedulers (59)ldst uops in schedulers (5b)5f6061696b6d6emap stall dispatch (70)map rewind (75)map stall (76)dispatch uop (78)map int uop (7c)map simd uop (7e)map int uop inputs (7f)map simd uop inputs (81)8283flush restart other nonspec (84)85inst all (8c)inst branch (8d)inst branch taken (90)inst branch cond (94)inst int alu (97)inst simd alu (9a)9fl1d cache writeback (a8)accfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
160024400513009646251600101016000010160000501280000110400200400394003919996320019160010201600002032000040039400391116002110910101600001000100228512416411241240036206160000104004040040400404004040040
160024400393002746251600101016000010160000501280000115400200400394003919996320019160010201600002032000040039400391116002110910101600001000100228311216211241240036206160000104004040040400404004040040
160024400393003946251600101016000010160000501280000115400200400394003919996320019160010201600002032000040039400391116002110910101600001000100228312416221242440036206160000104004040040400404004040040
1600244003930026446251600101016000010160000501280000115400203400394003919996320019160010201600002032000040039400391116002110910101600001000100228511216211122440036206160000104004040040400404004040040
160024400393003646251600101016000010160000501280000115400200400394003919996320019160010201600002032000040039400391116002110910101600001000100228511016211241240036206160000104004040040400404004040040
1600244003930054676216030610160292101600005012800001154002004003940039199962020019160010201600002032000040039400391116002110910101600001000100228512416211102440036206160000104004040040400404004040040
160024400392993646251600101016000010160000501280000115400200400394003919996320019160010201600002032000040039400391116002110910101600001000100228511216211241240036206160000104004040040400404004040040
160024400393004846251600101016000010160000501280000115400200400394003919996320019160010201600002032000040039400391116002110910101600001000100228512416211241240036206160000104004040040400404004040040
1600244003930030462516001010160000101600005012800001154002004003940039199963200191600102016000020320000400394003911160021109101016000010001002285124162111924400362012160000104004040040400404004040040
1600244003929927462516001010160000101600005012800001154002004003940039199963200191600102016000020320000400394003911160021109101016000010075100228512416211242440036206160000104004040040400404004040040