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 (2D)

Test 1: uops

Code:

  sqshrun2 v0.4s, v1.2d, #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)031e1f3f4e51schedule uop (52)schedule simd uop (54)dispatch simd uop (57)ldst uops in schedulers (5b)60696d6emap 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 cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)f5f6f7f8fd
1004303722008225482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723006125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037233015625482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723006125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037232106125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723906125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037232106125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723006125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723006125482510001000100039831303018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037233306125482510001000100039831313018303730372415328951000100020003037303711100110000073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  sqshrun2 v0.4s, v1.2d, #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)18191e3f4e51schedule 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? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
1020430037225001111612954825101001001000010010000500427731313001830037300372826513287451010020010000200200003003730037111020110099100100100001000071021622296340100001003003830038300383003830038
1020430037224000061295392510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000071021622296340100001003003830038300383003830038
1020430037224000661295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000071021622296340100001003003830038300383003830038
1020430037225000361295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000071021622296340100001003003830038300383003830038
1020430037225000061295482510100100100001001000050042773131300183003730037282803287451010020010000200200003003730037111020110099100100100001000071031622296340100001003003830038301833003830038
10204300372250004861295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000071021622296340100001003003830038300383003830038
1020430037225000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000071021622296340100001003003830038300383003830038
1020430037225000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000071021622296340100001003003830038300383003830038
1020430037225000061295482510100100100001261000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000071021622296340100001003003830038300383003830038
1020430037225000061295482510100100100001001000050042773131300183003730037282653287451010020010000200200003003730037111020110099100100100001000071021622296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)03mmu table walk data (08)1e1f3f4e51schedule 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)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
10024300372250300612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250180612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
100243003722500053629548251001010100001010000504277313130018300373003728287202876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250270612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103008630038300383003830038
1002430037224000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225030612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225000612954825100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225090612954825100101010000101000050427731313001830037300372829032876710010201000020200003003730037111002110910101000010103640216222963010000103003830038300383003830038
1002430037225055509352953925100101010000101000050427731303001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  sqshrun2 v0.4s, v0.2d, #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)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)60696b6d6emap 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)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
102043003722500612954725101001001000010010000500427716003001803003730037282717287411010020010008200200163003730037111020110099100100100001000011171701629646100001003003830038300383003830038
1020430037225006129547251010010010000100100005004277160130018030037300372827110287541010020010008200200163003730037111020110099100100100001000011171801629646100001003003830038300383003830038
1020430037225007262954725101001001000010010000500427716013001803003730037282716287401010020010008200200163003730037111020110099100100100001000011171811629646100001003003830038300383003830038
102043003722500612954725101001001000010010000500427716013001803003730037282716287411010020010008200200163003730037111020110099100100100001000011171701629645100001003003830038300383003830038
1020430037225005362954725101001001000010010000500427716013001803003730037282717287401010020010008200200163003730037111020110099100100100001000011171701629646100001003003830038300383003830038
1020430037225001562952925101001001000010010000500427716013001803003730037282717287401010020010008200200163003730037111020110099100100100001000011171801629645100001003003830038300383003830038
102043003722410612954725101001001000010010000500427716013001803003730037282926287401010020010008200200163003730037111020110099100100100001000011171801629645100001003003830038300383003830038
102043003722400612954725101001001000010010000500427716003001803003730037282717287411010020010008200200163003730037111020110099100100100001000011171801629646100001003003830038300383003830038
102043003722500612954725101001001000010010000500427716003001803003730037282716287401010020010008200200163003730037111020110099100100100001000011171701629645100001003003830038300383003830038
102043003722500612954725101001001000010010000500427716013001803003730037282717287411010020010008200200163003730037111020110099100100100001000011171701629646100001003003830038300383003830038

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 instruction (0a)18191e3f4e51schedule 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)acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1002430037225003036612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640716332962910000103003830038300383003830038
100243003722500000612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640316332962910000103003830038300383003830038
1002430037225000001032954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640316332970110000103003830038300383003830038
1002430037225000024612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640316332962910000103003830038300383003830038
1002430037225000012612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010302640316332962910000103003830038300383003830038
100243008422500000612954725100101010008101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010030640316332962910000103003830038300383003830038
1002430037225000012612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640316332962910000103003830038300383003830038
100243003722500000612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640316332962910000103003830038300383003830038
100243003722400000612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640316332962910000103003830038300383003830038
100243003722511000612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640316332962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  sqshrun2 v0.4s, v8.2d, #3
  movi v1.16b, 0
  sqshrun2 v1.4s, v8.2d, #3
  movi v2.16b, 0
  sqshrun2 v2.4s, v8.2d, #3
  movi v3.16b, 0
  sqshrun2 v3.4s, v8.2d, #3
  movi v4.16b, 0
  sqshrun2 v4.4s, v8.2d, #3
  movi v5.16b, 0
  sqshrun2 v5.4s, v8.2d, #3
  movi v6.16b, 0
  sqshrun2 v6.4s, v8.2d, #3
  movi v7.16b, 0
  sqshrun2 v7.4s, v8.2d, #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)033f51schedule 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 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)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1602042009015129258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662006620066
1602042006515029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662006620066
1602042006515029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662014920066
1602042006515029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662006620066
1602042006515029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662006620066
1602042006515029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662006620066
1602042006515029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662006620066
1602042006515029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066201472006620066
1602042006515029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662006620066
1602042006515029258011610080016100800285006401960200452006520065612801282008002820016005620065200651116020110099100100160000100001111011916200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk data (08)1e3f51schedule 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 tlb miss (a1)l1d cache writeback (a8)acc2cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0ea? simd retires (ee)? int retires (ef)f5f6f7f8fd
160024204091500018712580010108000010800005064000011520027200462004632280010208000020160000200462004611160021109101016000010000010031821102121112122004315160000102004720047200472004720047
16002420240150004525800101080000108000050640000115200272004620046322800102080000201600002004620046111600211091010160000100000100308217202111172004315160000102004720047200472004720047
16002420277150030512580010108000010800005064000011520027200502004632280010208000020160000200462005011160021109101016000010001170100368218202118132004315160000102004720047200472004720047
16002420241150005125800101080000108000050640000115200312005020050322800102080000201600002004620050111600211091010160000100000100341132112442211142004730160000102005120051200472005120051
16002420217150002372580010108000010800005064000001520027200462004632280010208000020160000200462004611160021109101016000010000010040831142041213132004330160000102005120047200512005120047
160024202501500071025800101080000108000050640000115200272004620046322800102080000201600002004620050111600211091010160000100060010035821132421113132004315160000102004720047200472005120047
1600242023615000452580010108000010800005064000011520027200462004632280010208000020160000200462005011160021109101016000010000010031112212204111172004330160000102004720047200472004720047
1600242023615003452580010108000010800005064000011520027200462004632280010208000020160000200502004611160021109101016000010000010038113211202229132004715160000102004720051200512005120051
1600242021515000452580010108000010800005064000011520031200502004632280010208000020160000200502005011160021109101016000010000010034113211244211382004730160000102005120051200512005120051
160024202201500051258001010800001080000506400000152003120050200503228001020800002016000020050200501116002110910101600001000156010036112213204228142004715160000102004720047200472004720047

Test 5: throughput

Count: 16

Code:

  sqshrun2 v0.4s, v16.2d, #3
  sqshrun2 v1.4s, v16.2d, #3
  sqshrun2 v2.4s, v16.2d, #3
  sqshrun2 v3.4s, v16.2d, #3
  sqshrun2 v4.4s, v16.2d, #3
  sqshrun2 v5.4s, v16.2d, #3
  sqshrun2 v6.4s, v16.2d, #3
  sqshrun2 v7.4s, v16.2d, #3
  sqshrun2 v8.4s, v16.2d, #3
  sqshrun2 v9.4s, v16.2d, #3
  sqshrun2 v10.4s, v16.2d, #3
  sqshrun2 v11.4s, v16.2d, #3
  sqshrun2 v12.4s, v16.2d, #3
  sqshrun2 v13.4s, v16.2d, #3
  sqshrun2 v14.4s, v16.2d, #3
  sqshrun2 v15.4s, v16.2d, #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)03181e1f3f51schedule 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)9fl1d tlb access (a0)l1d tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)acc2branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1602044006030000030251601081001600081001600205001280132400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118516400361600001004004040040400404004040040
1602054003930006030251601081001600081001600205001280132400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118016400361600001004004040040400404004040040
1602044003930000030251601081001600081001600205001280132400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118016400361600001004004040040400404004040040
1602044003929900030251601081001600081001600205001280132400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118016400361600001004004040040400404004040040
1602044003930000030251601081001600081001600205001280132400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118016400361600001004004040040400404004040040
16020440039300000324251601081001600081001600205001280132400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118016400361600001004004040040400404004040040
16020440039300000220251601081001600081001600205001280132400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000016011110118016400361600001004004040040400404004040040
160204400393000007225160108100160008100160020500128013240020401004003919977619990160120200160032200320064400394010011160201100991001001600001000000473011110118016400361600001004004040040400404004040040
1602044003929900030251601081001600081001600205001280132400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118016400361600001004004040040400404004040040
1602044008929900030251601081001600081001600205001280132400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000000011110118016400361600001004004040040400404004040198

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03mmu table walk instruction (07)1e3f51schedule 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)5f60696d6emap 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 tlb miss (a1)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaebec? simd retires (ee)? int retires (ef)f5f6f7f8fd
16002440039300004625160010101600001016000050128000011400204003940039199963200191600102016000020320000400394003911160021109101016000010000010022312231621119184003615100160000104004040040400404004040040
16002440039299005225160010101600001016000050128000011400204003940039199963200191600102016000020320000400394003911160021109101016000010000010024312201641119194003615100160000104004040040400404004040040
1600244003930000462516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000301002362115162211918400363050160000104004040040400404004040040
16002440039299004625160010101600001016000050128000001400204003940039199963200451600102016000020320000400394003911160021109101016000010000010022321201621118184003630100160000104004040040402444004040040
16002440039300004625160010101600001016000050128000011400204003940039199963200191600102016000020320000400394003911160021109101016000010000010022611201622218184003630100160000104004040040400404004040040
160024400393000071125160010101600001016000050128000011400204003940039199963200461600102016000020320000400394003911160021109101016000010000010024312151621118174003615100160000104004040040400404004040040
1600244003930000462516001010160000101600005012800000140020400394003919996320019160010201600002032000040039400391116002110910101600001000301002231217162111717400361550160000104004040040400404004040040
16002440039300005225160010101600001016000050128075611400204003940039199963200191600102016000020320000400394003911160021109101016000010003010024311181621120154003615100160000104004040040400404004040040
1600244003930000462516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002210910101600001000001002261120162211914400361550160000104004040040402504004040040
1600244003930000522516001010160000101600005012800000140020400394003919996320019160010201600002032000040039400391116002110910101600001000001002261220162121821400363050160000104004040040400404004040040