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

RSHRN2 (8H)

Test 1: uops

Code:

  rshrn2 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 uop (01)cycle (02)03191e3f4e51schedule 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
1004303722006125482510001000100039831303018303730372415328951000100020003037303711100110000073216332630100030383038303830383038
1004303723006125482510001000100039831303018303730372415328951000100020003037303711100110000073316332630100030383038303830383038
1004303723006125482510001000100039831313018303730372415328951000100020003037303711100110000073316332630100030383038303830383038
1004303723106125482510001000100039831313018303730372415328951000100020003037303711100110000073316332630100030383038303830383038
1004303723006125482510001000100039831303018303730372415328951000100020003037303711100110000073316332630100030383038303830383038
1004303723006125482510001000100039831303018303730372415328951000100020003037303711100110000073316332630100030383038303830383038
1004303722006125482510001000100039831303018303730372415328951000100020003037303711100110000073316332630100030383038303830383038
1004303723006125482510001000100039831303018303730372415328951000100020003037303711100110000073316332630100030383038303830383038
1004303723006125482510001000100039831303018303730372415328951000100020003037303711100110000073316222630100030383038303830383038
1004303723006125482510001000100039831303018303730372415328951000100020003037303711100110000073316332630100030383038303830383038

Test 2: Latency 1->1

Code:

  rshrn2 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 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? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
10204300372250054612954825101001001000010010000500427731313001830037300372826532874510100200104992002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
10204300372240024612954825101001001000010010000500427731313001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225030612954825101001001000010010000500427731303001830037300372826532874510100204100002042000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037224000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225040612954825101001001000010010000500427731303001830037300372826532874510100204100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225000612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038

1000 unrolls and 10 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)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)a9acc2cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
1002430037225000000061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006403162229630010000103003830038300383003830038
1002430037225000000061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
1002430037225000000061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003721100211091010100001000000006402162229630010000103003830038300383003830038
1002430037225000000061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
10024300372250000018061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
1002430037225000000061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
1002430037225000000061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
1002430037225000000061295482510010101000010100005042773130300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
1002430037225000000061295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038
100243008522601100035282295482510010101000010100005042773131300183003730037282873287671001020100002020000300373003711100211091010100001000000006402162229630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  rshrn2 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 uop (01)cycle (02)0318191e3a3f4e51schedule 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 tlb access (a0)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
10204300852240000612954725101001001000010010000500427716013005403008530087282716287401025321410008204200163003730085111020110099100100100001000000011171701600296450100001003003830038300383003830038
10204300372250000612954725101001001000010010149500427716013001803003730037282716287411010020010008200200163003730037111020110099100100100001000000311171801600296450100001003003830038300383003830038
10204300372250000612954725101001001000010010000500427716013001803003730037282716287401010020010008200200163003730037111020110099100100100001000000011171801600296450100001003003830038300383003830038
102043003722500006129547251010010210000100100005004277160130018030085300372827117287591010020010179208200163003730085111020110099100100100001002200275411174301600296450100001003003830038300383003830038
10204300372250000612954725101001001000010010000500427716013001803003730037282716287401010020010008200200163003730037111020110099100100100001000000011171801600296450100001003003830038300383003830038
102043003722500007262954725101001041000010010000500427716013001803003730037282716287401010020010008200200163003730037111020110099100100100001000010011171801600296450100001003003830038300383003830038
102043003722500180612954725101001001000010010000500427716013001803003730037282946287401010020010008200200163003730037111020110099100100100001000010011171701600296450100001003003830038300383003830038
102043003722500005132954725101001001000010010000500427716013001803003730037282717287411010020010008200200163003730037111020110099100100100001000000011171701600296460100001003003830038300383003830038
10204300372250000612954725101001001000010010000500427716013001803003730037282716287401010020010008200200163003730037111020110099100100100001000000011171701600296450100001003003830038300383003830038
10204300372250000612954725101001001000010010000500427716013001803003730037282716287411010020010008200200163003730037111020110099100100100001000000011171701600296450100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)03mmu table walk data (08)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 tlb access (a0)l1d cache writeback (a8)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
100243003722500612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640416332962910000103003830038300383003830038
100243003722500612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640316332962910000103003830038300383003830038
100243003722400612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640316332962910000103003830038300383003830083
1002430037225030612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640316332962910000103003830038300383003830038
100243003722500612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640316332962910000103003830038300383003830038
100243003722500612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640316332962910000103003830038300383003830038
100243003722500612954725100101010000101000050427716013001830037300372828632876710010201017220200003003730037111002110910101000010000000640316332962910000103003830038300383003830038
1002430037224002292954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640316332962910000103003830038300383003830038
100243003722500612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640316332962910000103003830038300383003830038
100243003722500612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000640316332962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  rshrn2 v0.16b, v8.8h, #3
  movi v1.16b, 0
  rshrn2 v1.16b, v8.8h, #3
  movi v2.16b, 0
  rshrn2 v2.16b, v8.8h, #3
  movi v3.16b, 0
  rshrn2 v3.16b, v8.8h, #3
  movi v4.16b, 0
  rshrn2 v4.16b, v8.8h, #3
  movi v5.16b, 0
  rshrn2 v5.16b, v8.8h, #3
  movi v6.16b, 0
  rshrn2 v6.16b, v8.8h, #3
  movi v7.16b, 0
  rshrn2 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 uop (01)cycle (02)03191e3f51schedule 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 tlb miss (a1)ld unit uop (a6)l1d cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1602042009115003629258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100000011110119116200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100000011110119016200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401961200452006520065612801282008002820016005620065200652116020110099100100160000100000011110119016200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100000011110119016200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100000011110119016200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100000011110119016200621600001002006620066200662006620066
16020420065150019529258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100000011110119016200621600001002006620066200662006620066
160204200651510052258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100000011110119016200621600001002006620066200662006620066
1602042006515000599258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100000011110119016200621600001002006620066200662006620066
160204200651500029258011610080016100800285006401961200452006520065612801282008002820016005620065200651116020110099100100160000100000011110119016200621600001002006620066200662006620066

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)5f60696b6d6emap 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)e0eaec? simd retires (ee)? int retires (ef)f5f6f7f8fd
16002420078150045278001010800001080000506400001120032020051200513228001020800002016000020051200511116002110910101600001010010033311142521110920048201160000102005220052200522005220052
16002420051151045278001010800001080000506400001020032020051200513228001020800002016000020051200511116002110910101600001003010033311102521191020048201160000102005220052200522005220052
160024200511500299278001010800001080000506400001020032020051200513228001020800002016000020051200511116002110910101600001012001003231112252119820048201160000102005220052200522005220052
16002420051150045278001010800001080000506400001120032020051200513228001020800002016000020051200511116002110910101600001020010033311102521191020048201160000102005220052200522005220052
16002420051150045278001010800001080000506400001120032020051200513228001020800002016000020051200511116002110910101600001020010033311925211111020048201160000102005220052200522005220052
160024200511500452780010108000010800005064000010200320200512005132280010208000020160000200512005111160021109101016000010200100353111125211111120048201160000102006120052200522005220052
1600242005115004527800101080000108000050640000112003202005120051322800102080000201600002005120051111600211091010160000102001003131182521111920048201160000102005220052200522005220052
1600242005115004527800101080000108000050640000112003232005120051322800102080000201600002005120051111600211091010160000101301003231110252119920048201160000102005220052200522005220052
16002420051150045278001010800001080000506400001120032020051200513228001020800002016000020051200511116002110910101600001003010032311925211121120048201160000102005220052200522005220052
160024200511509452780010108000010800005064000011200320200512005132280010208000020160000200512005111160021109101016000010000100313111225211101220048201160000102005220052200522005220052

Test 5: throughput

Count: 16

Code:

  rshrn2 v0.16b, v16.8h, #3
  rshrn2 v1.16b, v16.8h, #3
  rshrn2 v2.16b, v16.8h, #3
  rshrn2 v3.16b, v16.8h, #3
  rshrn2 v4.16b, v16.8h, #3
  rshrn2 v5.16b, v16.8h, #3
  rshrn2 v6.16b, v16.8h, #3
  rshrn2 v7.16b, v16.8h, #3
  rshrn2 v8.16b, v16.8h, #3
  rshrn2 v9.16b, v16.8h, #3
  rshrn2 v10.16b, v16.8h, #3
  rshrn2 v11.16b, v16.8h, #3
  rshrn2 v12.16b, v16.8h, #3
  rshrn2 v13.16b, v16.8h, #3
  rshrn2 v14.16b, v16.8h, #3
  rshrn2 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 uop (01)cycle (02)03191e1f3f51schedule 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)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)daddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
16020440059300000972516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010010011110118416033400361600001004004040040400404004040040
16020440039300000302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118416022400361600001004004040040400404004040040
16020440039300000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118416042400361600001004004040040400404004040040
16020440039300000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118316034400361600001004004040142400404004040040
16020440039299000302516010810016000810016002050012801321400704003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118316022400361600001004004040040400404004040040
16020440039300000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118416043400361600001004004040040400404004040040
16020440039299000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118416043400361600001004004040040400404004040040
16020440039300000302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118416044400361600001004004040040400404004040040
16020440039300000302516010810016000810016002050012801320400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118416034400361600001004024240040400404004040040
16020440039300000302516010810016000810016002050012801321400204003940039199776199901601202001600322003200644003940039111602011009910010016000010000011110118416044400361600001004004040040400404004040088

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)mmu table walk data (08)l2 tlb miss instruction (0a)1e1f3f51schedule 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 tlb access (a0)l1d cache writeback (a8)a9acc2cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
160024400513001000046251600101016000010160000501280000115400204003940039199960320019160010201600002032000040039400391116002110910101600001000000100228212516111221940036216160000104004040040400404004040040
160024400393000000046251600101016000010160000501280000115400204003940039199960320019160010201600002032000040039400391116002110910101600001000000100228412216111221940036216160000104004040040400404004040040
1600244003930000000310251600101016000010160000501280000115400204003940039199960320019160010201600002032000040039400391116002110910101600001000000100228412216211182240036206160000104004040040400404004040040
160024400393000000046251600101016000010160000501280000115400204003940039199960320019160010201600002032000040039400391116002110910101600001000000100228411816111181940036207160000104004040040400404004040040
1600244003930001115046251600101016000010160000501280000115400204003940039199960320019160010201600002032000040039400391116002110910101600001000000100228411916211171640036206160000104004040040400404004040040
160024400393000000046251600101016000010160000501280000115400204003940039199960320019160010201600002032000040039400391116002110910101600001000000100228411816211182040036206160000104004040040400404004040040
160024400393000000046251600101016000010160000501280000115400204003940039199960320019160010201600002032000040039400391116002110910101600001000000100228422116211172040036206160000104004040040400404004040040
160024400393000000046251600101016000010160000501280000115400204003940039199967320019160010201600002032000040039400391116002110910101600001000000100228511616211161640036206160000104004040090400404004040040
16002440039300000005225160010101600001016000050128000011540020400394003919996032001916001020160000203200004003940039111600211091010160000100000010024167220163222117400364113160000104004040040400404004040040
16002440039300000004625160010101600001016000050128000011104002040039400391999603200191600102016000020320000400394003911160021109101016000010000001002413611716211182140036207160000104004040040400404004040040