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 (4S)

Test 1: uops

Code:

  rshrn2 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 cache writeback (a8)accfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)f5f6f7f8fd
10043037220612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
1004303723271472548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372312612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
100430372339612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037220612548251000100010003983133018303730372415328951000100020003037303711100110000373116112630100030383038303830383038
10043037230612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037230612548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037230612548251000100010003983133018303730372415328951000100020003037308511100110000073116112630100030383038303830383038
100430372302512548251000100010003983133018303730372415328951000100020003037303711100110000073116112630100030383038303830383038
10043037230612548251005100010003983133018303730372415328951000100020003037303711100110001073116112630100030383038303830383038

Test 2: Latency 1->1

Code:

  rshrn2 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)031e3f4e51schedule 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? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
1020430037225151892954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
102043003722501662954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
102043003722501242954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037224241032954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011613296340100001003003830038300383003830038
102043003722501242954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
1020430037225012429548251010010010000125100006264277313030018300373003728265328745101002001000020020000300373003711102011009910010010000100000710116112963425100001003003830038300383003830038
102043003722501242954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
10204300372250612954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
102043003722501872954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038
102043003722501242954825101001001000010010000500427731303001830037300372826532874510100200100002002000030037300371110201100991001001000010000071011611296340100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)031e3f4e51schedule 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 cache writeback (a8)acbranch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
10024300372259124295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640316222963010000103003830038300383003830038
1002430037225061295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250835295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225061295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250814295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250458295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225061295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
10024300372250168295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225061295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038
1002430037225061295482510010101000010100005042773133001830037300372828732876710010201000020200003003730037111002110910101000010000640216222963010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  rshrn2 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)03l2 tlb miss data (0b)1e3a3f4e51schedule 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 miss (a1)l1d cache writeback (a8)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
10204300372250006129547251010010010000100100005004277160130018300373003728271728741101002001000020020000300373003711102011009910010010000100000011171801629646100001003003830038300383003830038
10204300372250006129547251010010010000100100005004277160030018300373003728271728740101002001000820020016300373003711102011009910010010000100000011171701629645100001003003830038300383003830038
10204300372250006129547251010010010000100100005004277160130018300373003728271728741101002001000820020016300373003711102011009910010010000100000011171701629645100001003003830038300383003830038
10204300372250006129547251010010010000100100005004277160030018300373003728271728740101002001000820020016300373003711102011009910010010000100000011171701629646100001003003830038300383003830038
10204300372250016129547251010010010000100100005004277160030018300373003728271728740101002001000820020016300373003711102011009910010010000100000011171801629645100001003003830038300383003830038
10204300372250006129547251010010010000100100005004277160030018300373003728271728740101002001000820020016300373003711102011009910010010000100000011171701629646100001003003830038300383003830038
10204300372250006129547251010010010000100100005004277160130018300373003728271728740101002001000820020016300373003711102011009910010010000100000011171801629645100001003003830038300383003830038
10204300372250006129547251010010010000100100005004277160030018300373003728271628741101002001000820020016300373003711102011009910010010000100000011171801629645100001003003830038300383003830038
10204300372250006129547251010010010000100100005004277160130018300373003728271728741101002001000820020016300373003711102011009910010010000100000011171801629645100001003003830038300383003830038
10204300372250306129547251010010010000100100005004277160030018300373003728271728741101002001000820020016300373003711102011009910010010000100000311171701629645100001003003830038300383003830038

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)l1d tlb miss (a1)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acc2cfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
10024300372250000000612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000306402162229629010000103003830038300383003830038
10024300372250000000612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000006402162229629010000103003830038300383003830038
10024300372250000000892954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000006402162229629010000103003830038300383003830038
10024300372250000000612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000006402162229629010000103003830038300383003830038
10024300372250000000612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000006402162229629010000103003830038300383003830038
10024300372250000000612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000006402162229629010000103003830038300383003830038
100243003722500000001562954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000006402161229629010000103003830038300383003830038
100243003722400000007262954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000006402162229629010000103003830038300383003830038
10024300372250000000612954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000006402162229629010000103003830038300383003830038
100243003722500000901262954725100101010000101000050427716013001830037300372828632876710010201000020200003003730037111002110910101000010000000006402162229629010000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  rshrn2 v0.8h, v8.4s, #3
  movi v1.16b, 0
  rshrn2 v1.8h, v8.4s, #3
  movi v2.16b, 0
  rshrn2 v2.8h, v8.4s, #3
  movi v3.16b, 0
  rshrn2 v3.8h, v8.4s, #3
  movi v4.16b, 0
  rshrn2 v4.8h, v8.4s, #3
  movi v5.16b, 0
  rshrn2 v5.8h, v8.4s, #3
  movi v6.16b, 0
  rshrn2 v6.8h, v8.4s, #3
  movi v7.16b, 0
  rshrn2 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.2510

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)6061696d6emap 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)branch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd0d2d5map dispatch bubble (d6)dbddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1602042008915000029258011610080016100800285006401960020045200652006561280128200800282001600562006520065111602011009910010016000010001111011951016000200621600001002006620066200662006620066
1602042006515000029258011610080016100800285006401961520045200652006561280128200800282001600562006520065111602011009910010016000010001111011950016000200621600001002006620066200662006620066
1602042006515100029258011610080016100800285006401961520045200652006561280128200800282001600562006520065111602011009910010016000010001111011901016000200621600001002006620066200662006620066
1602042006515100029258011610080016100800285006401960020045200652006561280128200800282001600562006520065111602011009910010016000010001111011901016000200621600001002006620066200662006620066
1602042006515000029258011610080016100800285006401960020045200652006561280128200800282001600562006520065111602011009910010016000010001111011951016000200621600001002006620066200662006620066
1602042006515000029258011610080016100800285006401961520045200652006561280128200800282001600562006520065111602011009910010016000010001111011951016000200621600001002006620066200662006620066
1602042006515011029258011610080016100800285006401961520045200652006561280128200800282001600562006520065111602011009910010016000010001111011900016000200621600001002006620066200662006620066
1602042006515000029258011610080016100800285006401961520045200652006561280128200800282001600562006520065111602011009910010016000010001111011951016000200621600001002006620066200662006620066
1602042006515000029258011610080016100800285006401961020045200652006561280128200800282001600562006520065111602011009910010016000010001111011900016000200621600001002006620066200662006620066
1602042006515100029258011610080016100800285006401960020045200652006561280128200800282001600562006520065111602011009910010016000010001111011951016000200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)03l1i tlb fill (04)mmu table walk data (08)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)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)9fld unit uop (a6)l1d cache writeback (a8)accfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0? int output thing (e9)eaec? simd retires (ee)? int retires (ef)f5f6f7f8fd
16002420075150100000004527800101080000108000050640000115200322005120051322800102080000201600002005120051111600211091010160000100001002783123421244200570201160000102005220052200522005220052
16002420051150000000004529800101080000108000050640000115200322005120051322800102080000201600002005120051111600211091010160000100001002785152541255200570401160000102005220061200522005220052
1600242005115000000150051278001010800001080000506400001002003220051200513228001020800002016000020051200601116002110910101600001000310027114142522142200480201160000102005220052200522005220052
160024200601500000000063627800101080000108000050640000005200322005120060322800102080211201600002005120051111600211091010160000100001003084132521133200480201160000102005220052200612005220052
160024200511500000000045278001010800001080000506400001102003220372200513228001020800002016000020060200511116002110910101600001000010027115242522143200480201160000102005220052202922005220052
16002420051150000000004527800101080000108000050640000110200322006020060322800102080000201600002005120060111600211091010160000100001003081152521153200480402160000102005220052200522005220052
160024200511500010000019427800101080000108000050640000115200322005120051322800102080000201600002029420051111600211091010160000100001002731142521144200480201160000102005220052200522005220052
16002420051150000000006327800101080000108000050640000010200322005120051322800102080000201600002005120051111600211091010160000100001002784132522244200480201160000102006120052200522005220052
1600242005115000000917604527800101080000108000050640000000200322005120051322800102080000201600002005120060111600211091010160000100001002735133421144200480201160000102006120052200522005220052
16002420051150000000004527800101080000108000050640000105200322005120051322800102080000201600002006020051111600211091010160000100001002635133421235200480201160000102005220052200522006120052

Test 5: throughput

Count: 16

Code:

  rshrn2 v0.8h, v16.4s, #3
  rshrn2 v1.8h, v16.4s, #3
  rshrn2 v2.8h, v16.4s, #3
  rshrn2 v3.8h, v16.4s, #3
  rshrn2 v4.8h, v16.4s, #3
  rshrn2 v5.8h, v16.4s, #3
  rshrn2 v6.8h, v16.4s, #3
  rshrn2 v7.8h, v16.4s, #3
  rshrn2 v8.8h, v16.4s, #3
  rshrn2 v9.8h, v16.4s, #3
  rshrn2 v10.8h, v16.4s, #3
  rshrn2 v11.8h, v16.4s, #3
  rshrn2 v12.8h, v16.4s, #3
  rshrn2 v13.8h, v16.4s, #3
  rshrn2 v14.8h, v16.4s, #3
  rshrn2 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)03mmu table walk data (08)18191e3f51schedule 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)696b6d6emap 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)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)dde0? simd retires (ee)? int retires (ef)f5f6f7f8fd
16020440058299000030251601081001600081001600205001280132400200400394003919977619990160120200160032200320064400394003911160201100991001001600001000000111101180160400361600001004004040040400404004040040
1602044003930000057030251601081001600081001600205001280132400200400394003919977619990160120200160032200320064400394003911160201100991001001600001000629111101180162400361600001004004040040400404004040040
16020440039300000030251601081001600081001600205001280132400200400394003919977619990160120200160032200320064400394003911160201100991001001600001000000111101183160400361600001004004040040400404004040040
16020440039300000030251601081001600081001600205001280132400200400394003919977619990160120200160032200320064400394003911160201100991001001600001000000111101180160400361600001004004040040400404004040040
16020440039299000030251601081001600081001600205001280132400200400394003919977619990160120200160032200320064400394003911160201100991001001600001000000111101180160400361600001004004040040400404004040040
160204400393000000246251601081001600081001600205001280132400200400394003919977619990160120200160032200320064400394003911160201100991001001600001000000111101180160400361600001004004040040400404004040040
16020440039300000030251601081001600081001600205001280132400200400394003919977619990160120200160032200320064400394003911160201100991001001600001000000111101180160400361600001004004040040400404004040040
16020440039299100030251601081001600081001600205001280132400200400394003919977619990160120200160032200320064400394003911160201100991001001600001000000111101182160400361600001004004040040400404004040040
16020440039300000030251601081001600081001600205001280132400200400394003919977619990160120200160032200320064400394003911160201100991001001600001000000111101180160400361600001004004040040400404004040040
16020440039300000030251601081001600081001600205001280132400200400394003919977619990160120200160032200320064400394003911160201100991001001600001000000111101180160400361600001004004040040400404004040040

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)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)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
160024400393000000046251600101016000010160000501280000110400200400394003919996320019160010201600002032000040039400391116002110910101600001000100223115162113440036206160000104004040040400404004040040
16002440039300000486046251600101016000010160000501280000105400200400394003919996320019160010201600002032000040039400391116002110910101600001000100228114162114340036206160000104004040040400404004040040
16002440039300000882046251600101016000010160000501280000110400200400394003919996320019160010201600002032000040039400891116002110910101600001000100223214162114340036206160000104004040040400404004040040
16002440039300000825046251600101016000010160000501280000105400200400394003919996320019160010201600002032000040039400391116002110910101600001000100228314162113440036206160000104004040040400404004040040
160024400393000000046251600101016000010160000501280000100400200400394003919996320019160010201600002032000040039400391116002110910101600001000100223114162114340036206160000104004040040400404004040040
1600244003929900010513246251600101016000010160000501280000115400200400394003919996320019160010201600002032000040039400391116002110910101600001000100223314162114340036206160000104004040040400404004040040
160024400393000005460711251600101016000010160000501280000110400200400394003919996320019160010201600002032000040039400391116002110910101600001000100243324164224440036406160000104004040040400404004040040
160024400393000006270462516001010160000101600005012800002004002004003940039199963200191600102016000020320000400394003911160021109101016000010001002464241641244400362012160000104004040040400404004040040
160024400393000007830522516001010160000101600005012800000004002004003940039199963200191600102016000020320000400394003911160021109101016000010001002233110162113440036206160000104004040040400404004040040
160024400393000000046251600101016000010160000501280000115400200400394003919996320019160010201600002032000040039400391116002110910101600001000100223313162113440036206160000104004040040400404004040040