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

SQRSHRUN2 (2D)

Test 1: uops

Code:

  sqrshrun2 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)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)ld unit uop (a6)l1d cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)f5f6f7f8fd
1004303723014725482510001000100039831330183037303724153289510001000200030373037111001100004073316112630100030383038303830383038
100430372306125482510001000100039831330183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372306125482510001000100039831330183073303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372206125482510001000100039831330183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
1004303723075825482510001000100039831330183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372306125482510001000100039831330183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372306125482510001000100039831330183037303724153289510001000200030373037111001100001073116112630100030383038303830383038
100430372306125482510001000100039831330183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372306125482510001000100039831330183037303724153289510001000200030373037111001100000073116112630100030383038303830383038
100430372306125482510001000100039831330183037303724153289510001000200030373037111001100000073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  sqrshrun2 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)0318191e1f3f4e51schedule 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)9fld unit uop (a6)l1d cache writeback (a8)accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
102043003722500001032954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010001007101161129634100001003003830038300383003830038
102043003722500003922954825101001001000810010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
10204300372250000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003722500390612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
10204300372250000612954825101001001000010010000500427731303001830037300372826532874510100204100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
102043003722400001032954825101001001000010010000500427731303001830037300372826532874510267200100002002000030037300371110201100991001001000010000007101241129634100001003003830038300383003830038
102043003722520002082954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
10204300372250000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
10204300372260000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038
10204300372250000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000007101161129634100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)03191e1f3a3f4e51schedule 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)accdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
10024300372250000822954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372240000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010030640216222963010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300863003830038
10024300372250000612954825100101010000101000050427731313001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  sqrshrun2 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)18191e1f3a3f4e51schedule 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)acbranch 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
1020430037225000270061295472510100100100001001000050042771600300183003730037282526287401010020010008200200163003730037111020110099100100100001000011171701600296460100001003003830038300383003830038
102043003722500000061295472510100100100001001000050042771600300183003730037282717287411010020010008200200163003730037111020110099100100100001000011171701600296450100001003003830038300383003830038
102043003722500000061295472510100100100001001000050042771600300183003730037282716287401010020010008200200163003730037111020110099100100100001000011171801600296460100001003003830038300383003830038
102043003722500090197295472510100100100001001000050042771600300183003730037282526287331010020010000200200003003730037111020110099100100100001000011172222422296290100001003003830038300383003830038
102043003722500060197295472510100100100001001000050042771600300183003730037282526287331010020010000200200003003730037111020110099100100100001000011172222422296290100001003003830038300383003830038
102043003722500000197295472510100100100001001000050042771601300183003730037282526287331010020010000200200003003730037111020110099100100100001000011172222422296290100001003003830038300383003830038
102043003722500000197295472510100100100001001000050042771600300183003730037282526287331010020010000200200003003730037111020110099100100100001000011172222422296290100001003003830038300383003830038
102043003722500000197295472510100100100001001000050042771601300183003730037282526287331010020010000200200003003730037111020110099100100100001000011172222422296290100001003003830038300383003830038
102043003722500000197295472510100100100001001000050042771601300183003730037282526287331010020010000200200003003730037111020110099100100100001000011172222422296290100001003003830038300383003830038
102043003722500000197295472510100100100001001000050042771600300183003730037282526287331010020010000200200003003730037111020110099100100100001000011172222422296290100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)0318191e3f4e51schedule 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
100243003722500517262954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024300372240007262954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024300372250042612954725100101010000101015050427716013001830084300372828632876710010201000020200003003730037111002110910101000010000661216222962910000103003830038300383003830038
10024300372250033612954725100181210000101030061427716013001830037300372829172876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024300372250036612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
1002430037225006612954725100101010000101000050427716003001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024300372250012612953825100101010000101000050427716013001830037300372828632876710010201000020200003008530084111002110910101000010140640216222962910000103003830038300383003830038
1002430037225005371032954725100101010000101000050427716003001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10025300372250018612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000640216222962910000103003830038300383003830038
10024300372240033612954725100101010000101000050427716003001830037300372828632876710010201000020200003003730037111002110910101000010103640216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  sqrshrun2 v0.4s, v8.2d, #3
  movi v1.16b, 0
  sqrshrun2 v1.4s, v8.2d, #3
  movi v2.16b, 0
  sqrshrun2 v2.4s, v8.2d, #3
  movi v3.16b, 0
  sqrshrun2 v3.4s, v8.2d, #3
  movi v4.16b, 0
  sqrshrun2 v4.4s, v8.2d, #3
  movi v5.16b, 0
  sqrshrun2 v5.4s, v8.2d, #3
  movi v6.16b, 0
  sqrshrun2 v6.4s, v8.2d, #3
  movi v7.16b, 0
  sqrshrun2 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)03mmu table walk data (08)09l2 tlb miss data (0b)18191e1f3f51schedule 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)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
160204200901500000090292580116100800161008002850064019602004520065200656128012820080028200160056200652006511160201100991001001600001000011110119016002006201600001002006620066200662006620066
160204200651500000000292580116100800161008002850064019602004520065200656128012820080028200160056200652022921160201100991001001600001000011110119016002006201600001002006620066200662006620066
160204200651500000000292580324100800161008002850064019602004520065200656128012820080028200160056200652006511160201100991001001600001000011110119016002006201600001002006620066200662006620066
160204200651510000000292580116100800161008002850064019602004520065200656128012820080028200160056200652006511160201100991001001600001000011110119016002006201600001002006620066200662006620066
1602042006515100000002925801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010013011110119016002006201600001002006620066200662006620066
160204200651500000000292580116100800161008002850064019602004520065200656128012820080028200160056200652006511160201100991001001600001000011110119016002006201600001002006620066200662006620066
16020420065151000003606942580116100800161008002850064019602004520065200656128012820080028200160056200652006511160201100991001001600001000011110119016002006201600001002006620066200662006620066
160204200651500000000292580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000011110119016002006201600001002006620066200662006620066
160204200651500000000292580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000011110119016002006201600001002006620066200662006620066
160204200651500000000292580116100800161008002850064019612004520065200656128012820080028200160056200652006511160201100991001001600001000011110119016002006201600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1i tlb fill (04)l2 tlb miss instruction (0a)18191e1f3a3f51schedule 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)5f6061696d6erob 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)9fl1d tlb access (a0)l1d tlb miss (a1)l1d cache writeback (a8)a9accfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaec? simd retires (ee)? int retires (ef)f5f6f7f8fd
1600242007415110004200512780010108000010800005064000011520032200602005103228001020800002016000020051200511116002110910101600001000000100368423725211131920048201160000102005220052200522005220052
16002420051150000060095018680432108041710805275064421610520356204582045303312880537208052620161048204622046061160021109101016000010041021931013885215202421192420428202160000102050820451204582044920456
1600242045115000003300452780115108000010800005064000000520041200602006003228001020800002016000020060200601116002110910101600001000103100638511325211221520048201160000102005220052200522005220052
160024200511500000120112927800101080000108000050645888115205502060820691070128804322080628241606302085520508111160021109101016000010400442251030331112247211221620814150160000102090820849209072093820047
1600242101415901119158444004525800101080000108000050640840110200272004620046032280010208000020160000200462004611160021109101016000010000012100363111320211131320043150160000102004720047200472005020047
160024200461510000000452580010108000010800005064000011020029200462004603228001020800002016000020046200461116002110910101600001000000100396221324422101220047300160000102005120051200512005120051
160024200501500000000512580010108000010800005064000001020027200462004603228001020800002016000020046200461116002110910101600001000003100376221524422201220047300160000102005120051200512005120051
160024200501500000900512580010108000010800005064000001520031200462005003228001020800002016000020046200501116002110910101600001000000100378211420211131320043150160000102004720047200472004720047
160024200461500000000452580010108000010800005064000001520027200462004603228001020800002016000020046200461116002110910101600001000000100368211320211131620043150160000102004720047200472004720047
1600242004615000000004525800101080000108000050640000115200272004620046032280010208000020160000200502004611160021109101016000010000001003611321720412131320043150160000102004720047200512004720047

Test 5: throughput

Count: 16

Code:

  sqrshrun2 v0.4s, v16.2d, #3
  sqrshrun2 v1.4s, v16.2d, #3
  sqrshrun2 v2.4s, v16.2d, #3
  sqrshrun2 v3.4s, v16.2d, #3
  sqrshrun2 v4.4s, v16.2d, #3
  sqrshrun2 v5.4s, v16.2d, #3
  sqrshrun2 v6.4s, v16.2d, #3
  sqrshrun2 v7.4s, v16.2d, #3
  sqrshrun2 v8.4s, v16.2d, #3
  sqrshrun2 v9.4s, v16.2d, #3
  sqrshrun2 v10.4s, v16.2d, #3
  sqrshrun2 v11.4s, v16.2d, #3
  sqrshrun2 v12.4s, v16.2d, #3
  sqrshrun2 v13.4s, v16.2d, #3
  sqrshrun2 v14.4s, v16.2d, #3
  sqrshrun2 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.2503

retire uop (01)cycle (02)03mmu table walk instruction (07)mmu table walk data (08)09l2 tlb miss instruction (0a)l2 tlb miss data (0b)18191e1f3a3f51schedule 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)ld unit uop (a6)l1d cache writeback (a8)a9acbranch 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
16020440058300000000000091225160108100160008100160020500128013214002040039400391997706199901601202001600322003200644003940039211602011009910010016000010000000022210129123114004601600001004005040050400494004940049
1602044004830000000000006426160116100160016100160028500128019614002940048400481997609199861601282001600382003200764004840048111602011009910010016000010000000022210128223114004601600001004005040049400494004940049
1602044004830000000000006426160116100160016100160028500128019604002940048400481997609199861601282001600382003200764004940048111602011009910010016000010000000022210128223224004501600001004005040050400494004940049
1602044004930000000000006427160116100160016100160028500128019604002940049400481997609199861601282001600382003200764004840049111602011009910010016000010000000022210128123214004501600001004005040050400494004940050
16020440049300000000000064261601161001600161001600285001280196140029400494004819976010199861601282001600382003200764004840048111602011009910010016000010000000022210128123224004501600001004004940050400494004940050
16020440048300000000000064261601161001600161001600285001280196140029400484004819976010199861601282001600382003200764004940048111602011009910010016000010000000022210128123114004601600001004004940049400494004940049
1602044004830000000000006426160116100160016100160028500128019614002940048400491997609199861601282001600382003200764004940048111602011009910010016000010000000022210129123114004601600001004004940050400504005040050
16020440048300000000000064271601161001600161001600285001280196140029400484004819976010199861601282001600382003200764004940048111602011009910010016000010000000022210128123114004601600001004005040050400494004940049
16020440048299000000000064271601161001600161001600285001280196040029400484004819976010199861601282001600382003200764004840049111602011009910010016000010000000022210128123114004501600001004004940049400494004940049
160204400483000000000600464651603141001602131021602385001281832140029400484004819987018200391603392001602432023204964016040208411602011009910010016000010024202144522210163175114011201600001004017240174401524021240212

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)0318191e3f51schedule 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 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 cache writeback (a8)acbranch mispred nonspec (cb)cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0? int output thing (e9)eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
160024400513000004625160010101600001016000050128000011540020400394003919996032001916001020160000203200004003940039111600211091010160000100001002283151621124400360206160000104004040040400404004040040
1600244003929901033725160010101600001016000050128000011540020400394003919996032001916001020160000203200004003940039111600211091010160000100001002284141622124400360206160000104004040040400404004040040
160024400393000004625160010101600001016000050128000000040020400394003919996032001916001020160000203200004003940039111600211091010160000100001002284121622124400360206160000104004040040400404004040040
160024400393000004625160010101600001016000050128000010040020400394003919996032001916001020160000203200004003940039111600211091010160000100001002284121621144400360206160000104004040040400404004040040
160024400393000004625160010101600001016011250128000011540020400394003919996032001916001020160000203200004003940039111600211091010160000100001002484121621124400360206160000104004040040400404004040040
160024400392990004625160010101600001016000050128000011540020400394003919996732001916001020160000203200004008940039211600211091010160000100001002284141621124400360206160000104004040040400404004040040
160024400393000004625160010101600001016000050128000011540020400394003919996032001916001020160000203200004003940039111600211091010160000100001002284121621164400360206160000104009140040400404004040040
160024400392990004625160010101600001016000050128000011540020400394003919996032001916001020160000203200004003940039111600211091010160000100001002284141621142400360206160000104004040040400404004040040
1600244003930000946251600101016000010160000501280000115400204003940039199960320019160010201600002032000040039400391116002110910101600001000010022114121621124400360206160000104004040040400404004040040
1600244003930000052251600101016000010160000501280000115400204003940039199960320019160010201600002032000040039400391116002110910101600001001501002284141621144400360406160000104004040040400404004040040