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

Test 1: uops

Code:

  rshrn2 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)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
100430372306125482510001000100039831303018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372206125482510001000100039831303018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372306125482510001000100039831303018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372396125482510001000100039831303018308330372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372206125394410001000100039831303018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372306125482510001000100039831303018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372306125482510001000100039831303018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372306125482510001000100039831303018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
100430372206125482510001000100039831303018303730372415328951000100020003037303711100110000073216222630100030383038303830383038
1004303723246125482510001000100039831313018303730372415328951000100020003037303711100110000073216222630100030383038303830383038

Test 2: Latency 1->1

Code:

  rshrn2 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)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 tlb access (a0)l1d tlb miss (a1)l1d cache writeback (a8)a9acbranch mispred nonspec (cb)cfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
102043003722506129548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000007101161129634100001003003830038300383003830038
1020430037224366129548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000007101161129634100001003003830038300383003830038
102043003722506129548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000007101161129634100001003003830038300383003830038
102043003722506129548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000007101161129634100001003003830038300383003830038
102043003722506129548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000007101161129634100001003003830038300383003830038
1020430037225072629548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000010007101161129634100001003003830038300383003830038
1020430037225072629548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000007101161129634100001003003830038300383003830038
1020430037225072629548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000007101161129634100001003003830038300383003830038
1020430037225072629548251010010010000100100005004277313300183003730037282653287451010020010000200200003003730037111020110099100100100001000000007101161129634100001003003830038300383003830038
102043003722506129548251010010010000100100005004277313300653003730037282653287451010020010000200200003003730037111020110099100100100001000000007101161129634100001003003830038300383003830038

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)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)a9accfd5map dispatch bubble (d6)ddfetch restart (de)e0? int output thing (e9)? simd retires (ee)? int retires (ef)f5f6f7f8fd
100243003722500061295482510010101000010100005042773130300183003730037282870328767100102010000202000030037300371110021109101010000100000006403163329630010000103003830038300383003830038
100243003722500061295482510010101000010100005042773131300183003730037282870328767100102010000202000030037300371110021109101010000100000006403163329630010000103003830038300383003830038
100243003722500061295482510010101000010100005042773130300183003730084282870328767100102010000202000030037300371110021109101010000100000006403163329630010000103003830038300383003830038
100243003722500061295482510010101000810100005042773130300183003730037282870328767100102010000202000030037300371110021109101010000100000006403163329630010000103003830038300383003830038
100243003722500061295482510010101000010100005042773131300183003730037282870328767100102010000202000030037300371110021109101010000100003006403162329630010000103003830038300383003830038
100243003722400061295482510010101000010100005042773131300183003730037282870328767100102010000202000030037300371110021109101010000100000006403163329630010000103003830038300383003830038
100243003722500061295482510010101000010100005042773131300183003730037282870328767100102010000202000030037300371110021109101010000100000006403163329630010000103003830038300383003830038
100243003722500061295482510010101000010100005042773130300183003730037282870328767100102010000202000030037300371110021109101010000100000006403163329630010000103003830038300383003830038
100243003722500061295482510010101000010100005042773130300183003730037282870328767100102010000202000030037300371110021109101010000100000006403163329650010000103003830038300383003830038
100243003722500061295482510010101000010100005042773130300183003730037282870328767100102010000202000030037300371110021109101010000100000006403163329630010000103003830038300383003830038

Test 3: Latency 1->2

Code:

  rshrn2 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)03mmu table walk data (08)l2 tlb miss data (0b)18191e1f3a3f4e5051schedule 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)l1d cache writeback (a8)acc2branch 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
1020430037225000000061295473002125101001001000010010000500427716003001830037300372827172874010100200100082002001630037300371110201100991001001000010000000011172222422296290100001003003830038300383003830038
102043003722500000009729547025101001001000010010000500427716003001830037300372825262873310100200100002002000030037300372110201100991001001000010000000011172222422296290100001003003830038300383003830038
102043003722400000019729547025101001001000010010000500427716003001830037300372827172874010100200100082002001630037300371110201100991001001000010000000011171701600296460100001003003830038300383003830038
102043003722500000006129547025101001001000010010000500427716003001830037300372827162874110100200100082002001630037300371110201100991001001000010000020011171801622296290100001003003830038300383003830038
102043003722500000019729547025101001001000010010000500427716003001830037300372825262873310100200100002002000030037300371110201100991001001000010000000011172222422296290100001003003830038300383003830038
102043003722500000019729547025101001001000010010000500427716003001830037300372827172874110100200100082002001630037300371110201100991001001000010000000011171801600296450100001003003830038300383003830038
102043003722500000006129547025101001001000010010000500427716003001830037300372827172874110100200100082002001630037300371110201100991001001000010000000011171701600296450100001003003830038300383003830038
102043003722500000006129547025101001001000010010000500427716003001830037300372827162874110100200100082002001630037300371110201100991001001000010000000011171701600296450100001003003830038300383003830038
10204300372240000000612954702510100100100001001000050042771600300183003730037282717287411010020010008200200163003730037111020110099100100100001000004712011171701600296450100001003003830038300383003830038
102043003722500000006129547025101001001000010010000500427716003001830037300372827172874010100200100082002001630037300371110201100991001001000010000000011171801600296460100001003003830038300383003830038

1000 unrolls and 10 iterations

Result (median cycles for code): 3.0037

retire uop (01)cycle (02)03191e3f4e51schedule 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)9fld unit uop (a6)l1d cache writeback (a8)acbranch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
1002430037225006129547251001010100001010000504277634300223003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383003830038
1002430037225006129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383003830038
1002430037225006129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383003830038
1002430037225006129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383003830038
1002430037225006129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000300640216222962910000103003830038300383003830038
1002430037225006129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383003830038
1002430037225006129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383003830038
1002430037224006129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383003830038
1002430037225006129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383003830038
1002430037225006129547251001010100001010000504277160300183003730037282863287671001020100002020000300373003711100211091010100001000000640216222962910000103003830038300383003830038

Test 4: throughput

Count: 8

Code:

  movi v0.16b, 0
  rshrn2 v0.4s, v8.2d, #3
  movi v1.16b, 0
  rshrn2 v1.4s, v8.2d, #3
  movi v2.16b, 0
  rshrn2 v2.4s, v8.2d, #3
  movi v3.16b, 0
  rshrn2 v3.4s, v8.2d, #3
  movi v4.16b, 0
  rshrn2 v4.4s, v8.2d, #3
  movi v5.16b, 0
  rshrn2 v5.4s, v8.2d, #3
  movi v6.16b, 0
  rshrn2 v6.4s, v8.2d, #3
  movi v7.16b, 0
  rshrn2 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)03l2 tlb miss data (0b)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)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 access (a0)l1d tlb miss (a1)ld unit uop (a6)st unit uop (a7)l1d cache writeback (a8)a9acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfd5map dispatch bubble (d6)ddfetch restart (de)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
160204200651500002925801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010070003001111011901600200621600001002006620066200662006620066
160204200651500002925801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010000000001111011901600200621600001002006620066200662006620066
16020420065150000292580116100800161008002850064019602004520065200656128012820080028200160056200652006511160201100991001001600001000000160901111011901600200621600001002006620066200662006620066
160204200651510002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000000001111011901600200621600001002006620066200662006620066
160204200651500002925801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010000000001111011901600200621600001002006620066200662006620066
160204200651500002925801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010000001001111011901600200621600001002006620066200662006620066
1602042006515000050425801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010000000001111011901600200621600001002006620066200662006620066
160204200651500002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000000001111011901600200621600001002006620066200662006620066
160204200651500002925801161008001610080028500640196020045200652006561280128200800282001600562006520065111602011009910010016000010000000001111011901600200621600001002006620066200662006620066
160204200651500002925801161008001610080028500640196120045200652006561280128200800282001600562006520065111602011009910010016000010000000001111011901600200621600001002006620066200662006620066

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)031e3a3f51schedule 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 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)acbranch cond mispred nonspec (c5)cfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)dfe0eaec? simd retires (ee)? int retires (ef)f5f6f7f8fd
16002420110150004527800101080000108000050640000102003220051200513228001020800002016000020051200511116002110910101600001000001004231182521144620048201160000102006120061200522006120061
16002420060150005129800101080000108000050640000012004120060200603228001020800002016000020060200601116002110910101600001001001004562142542243620048402160000102005220061200612006120061
16002420060150004527800101080000108000050640000112003220051200513228001020800002016026420051200511116002110910101600001000001004661132521166620048201160000102005220061200522005220061
16002420051150015127800101080000108000050640000112003220051200513228001020800002016000020051200511116002110910101600001000001004661172521176620048201160000102005220052200522005220052
16002420051150015127800101080000108000050640000112003220051200513228001020800002016000020051200511116002110910101600001000001004461142521144620048201160000102005220052200522005220052
16002420051151015127800101080000108000050640000112003220051200513228001020800002016000020051200511116002110910101600001006001004361162521164620048201160000102005220052200522006120052
16002420051150015127800101080000108000050640000112003220051200513228001020800002016000020051200511116002110910101600001021001004561162521167620048202160000102005220052200522005220052
16002420051150019327800101080000108000050640000112003220051200513228001020800002016000020051200511116002110910101600001000001004361143421144620048201160000102005220052201192005220052
16002420051150015127800101080000108000050640000112003220051200513228001020800002016000020051200511116002110910101600001000001004362142521176620048201160000102005220052200612013020052
16002420051150015127800101080000108000050640000112003220051200513228001020800002016000020051200601116002110910101600001000001004361132521176620048202160000102005220052200522005220052

Test 5: throughput

Count: 16

Code:

  rshrn2 v0.4s, v16.2d, #3
  rshrn2 v1.4s, v16.2d, #3
  rshrn2 v2.4s, v16.2d, #3
  rshrn2 v3.4s, v16.2d, #3
  rshrn2 v4.4s, v16.2d, #3
  rshrn2 v5.4s, v16.2d, #3
  rshrn2 v6.4s, v16.2d, #3
  rshrn2 v7.4s, v16.2d, #3
  rshrn2 v8.4s, v16.2d, #3
  rshrn2 v9.4s, v16.2d, #3
  rshrn2 v10.4s, v16.2d, #3
  rshrn2 v11.4s, v16.2d, #3
  rshrn2 v12.4s, v16.2d, #3
  rshrn2 v13.4s, v16.2d, #3
  rshrn2 v14.4s, v16.2d, #3
  rshrn2 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)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)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 cache writeback (a8)acbranch cond mispred nonspec (c5)branch mispred nonspec (cb)cdcfmap dispatch bubble (d6)e0? simd retires (ee)? int retires (ef)f5f6f7f8fd
160204400393000513251601081001600081001600205001280132004002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011816400361600001004004040040400404004040040
16020440039313030251601081001600081001600205001280132014002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011816400361600001004004040040400404004040040
16020440039299030251601081001600081001600205001280132004002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011816400361600001004004040040400404004040040
16020440039300030251601081001600081001600205001280132004002040039400391997761999016012020016003220032006440039400392116020110099100100160000100001111011816400361600001004004040040400404004040040
16020440039300030251601081001600081001600205001280132004002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011816400361600001004004040040400404004040040
16020440039299030251601081001600081001600205001280132004002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011816400361600001004004040040400404004040040
16020440039299330251601081001600081001600205001280132004002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011816400361600001004004040040400404004040040
16020440039300030251601081001600081001600205001280132004002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011816400361600001004004040040400404004040040
160204400392990734251601081001600081001600205001280132004002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011816400361600001004004040040400404004040040
160204400393000695251601081001600081001600205001280132004002040039400391997761999016012020016003220032006440039400391116020110099100100160000100001111011816400361600001004004040040400404004040040

1000 unrolls and 10 iterations

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

retire uop (01)cycle (02)0318191e1f3f51schedule 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)9fld unit uop (a6)l1d cache writeback (a8)a9accfd0d2l1i cache miss demand (d3)d5map dispatch bubble (d6)d9dadbddfetch restart (de)e0eaeb? simd retires (ee)? int retires (ef)f5f6f7f8fd
1600244005130000001574251600101016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000100223116162114540036206160000104004040040400404004040040
160024400393000000294251600101016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000100223115162115440036206160000104004040040400404004040040
160024400392990000280251600101016000010160000501280000114002040089400391999632001916001020160000203200004003940039111600211091010160000100000100226115162115740036406160000104004040040400404004040040
160024400392990000243251600101016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000100223118162117740036206160000104004040040400404004040040
160024400393000000291251600101016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000100223117162115840036406160000104004040040400404004040040
16002440039300000024012516001010160000101600005012800001140020400394003919996320019160010201600002032000040039400391116002110910101600001000001002462141642145400364012160000104004040040400404004040040
1600244003930000001613251600101016000010160000501280000014002040039400391999632001916001020160000203200004003940039111600211091010160000100000100226115162115840036406160000104004040040400404004040040
1600244003930000001561251600101016000010160000501280000114002040039400391999632001916001020160000203202644003940039111600211091010160000100000100246128164215540036406160000104004040040400404004040040
160024400393001000275251600101016000010160000501280000014002040039400391999632001916001020160000203200004003940039111600211091010160000100000100243118162115440036406160000104004040040400404004040040
160024400393000090275251600101016000010160000501280000114002040039400391999632001916001020160000203200004003940039111600211091010160000100000100243127162115440036406160000104004040040400404004040040